summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-02-21 12:44:27 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-02 08:43:21 +0100
commit93ee903da7b10326b40bc43d5f5c659d527e8814 (patch)
treedb887263060408bee2e40efe92075e888ee39dae /qmake/project.cpp
parent74a6669fa7c0d6e2cb7d34d56332d620d2a07755 (diff)
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 <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 0533ab30b5..8aa3ed2ed6 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1326,6 +1326,14 @@ QMakeProject::read(uchar cmd)
parse("CONFIG += " + Option::user_configs.join(" "), vars);
}
+ // After user configs, to override them
+ if (!extra_configs.isEmpty()) {
+ parser.file = "(extra configs)";
+ parser.from_file = false;
+ parser.line_no = 1; //really arg count now.. duh
+ parse("CONFIG += " + extra_configs.join(" "), vars);
+ }
+
if(cmd & ReadProFile) { // parse project file
debug_msg(1, "Project file: reading %s", pfile.toLatin1().constData());
if(pfile != "-" && !QFile::exists(pfile) && !pfile.endsWith(Option::pro_ext))
@@ -1349,12 +1357,14 @@ QMakeProject::read(uchar cmd)
}
}
- //after configs (set in BUILDS)
- if ((cmd & ReadSetup) && !Option::after_user_configs.isEmpty()) {
- parser.file = "(configs)";
+ // Again, to ensure the project does not mess with us.
+ // Specifically, do not allow a project to override debug/release within a
+ // debug_and_release build pass - it's too late for that at this point anyway.
+ if (!extra_configs.isEmpty()) {
+ parser.file = "(extra configs)";
parser.from_file = false;
parser.line_no = 1; //really arg count now.. duh
- parse("CONFIG += " + Option::after_user_configs.join(" "), vars);
+ parse("CONFIG += " + extra_configs.join(" "), vars);
}
if(cmd & ReadFeatures) {