From 93ee903da7b10326b40bc43d5f5c659d527e8814 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Feb 2012 12:44:27 +0100 Subject: clean up build pass project initialization instead of messing with the Option singleton, add a way to inject extra config values into QMakeProject. Change-Id: Ia347dcc38af2c72913e30ebf5c2b4044f93b4f5f Reviewed-by: Joerg Bornemann Reviewed-by: Marius Storm-Olsen --- qmake/generators/metamakefile.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'qmake/generators') diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index b9fec023ab..55ab0a5af5 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -238,25 +238,21 @@ MakefileGenerator //initialize the base QHash basevars; + QStringList basecfgs; if(!project->isEmpty(build + ".CONFIG")) - basevars["CONFIG"] += project->values(build + ".CONFIG"); - basevars["CONFIG"] += build; - basevars["CONFIG"] += "build_pass"; + basecfgs = project->values(build + ".CONFIG"); + basecfgs += build; + basecfgs += "build_pass"; + basevars["CONFIG"] = basecfgs; basevars["BUILD_PASS"] = QStringList(build); QStringList buildname = project->values(build + ".name"); basevars["BUILD_NAME"] = (buildname.isEmpty() ? QStringList(build) : buildname); //create project QMakeProject *build_proj = new QMakeProject(project->properties(), basevars); + build_proj->setExtraConfigs(basecfgs); - //all the user configs must be set again afterwards (for .pro tests and for .prf tests) - const QStringList old_after_user_config = Option::after_user_configs; - const QStringList old_user_config = Option::user_configs; - Option::after_user_configs += basevars["CONFIG"]; - Option::user_configs += basevars["CONFIG"]; build_proj->read(project->projectFile()); - Option::after_user_configs = old_after_user_config; - Option::user_configs = old_user_config; //done return createMakefileGenerator(build_proj); -- cgit v1.2.3