summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-24 14:47:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-25 14:51:30 +0200
commit910573f8e6d9230cb62cb5b2e31e556e67e114a7 (patch)
tree82697c87ee71f9d210c9d1639905a199b82822b5
parentc15e8517ef877a141df7cd5d4767d19ac81e7c2e (diff)
xcode: Move Qt preprocessor steps to separate target
Xcode resolves dependencies at the beginning of each target, so if a Qt preprocessor such as moc or rcc updates a cpp file Xcode will not rebuild the cpp file until the next build. We solve this by moving the Qt proceprocesor handling to a separate aggregate build tool target, which the main application target then depends on. Change-Id: I8f9225b9603dc5f279b1cb60976fe709bd97963e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 524603aa63..7a7d42f297 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1260,11 +1260,33 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
<< "\t\t};\n";
+ {
+ QString aggregate_target_key = keyFor(pbx_dir + "QMAKE_PBX_AGGREGATE_TARGET");
+ project->values("QMAKE_PBX_TARGETS").append(aggregate_target_key);
+ t << "\t\t" << aggregate_target_key << " = {\n"
+ << "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES"), SettingsAsList, 4) << ";\n"
+ << "\t\t\t" << writeSettings("dependencies", ProStringList(), SettingsAsList, 4) << ";\n"
+ << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_TARGET"), SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("isa", "PBXAggregateTarget", SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList) << ";\n"
+ << "\t\t\t" << writeSettings("productName", "Qt Preprocess") << ";\n"
+ << "\t\t\t" << writeSettings("name", "Qt Preprocess") << ";\n"
+ << "\t\t};\n";
+
+ QString aggregate_target_dep_key = keyFor(pbx_dir + "QMAKE_PBX_AGGREGATE_TARGET_DEP");
+ t << "\t\t" << aggregate_target_dep_key << " = {\n"
+ << "\t\t\t" << writeSettings("isa", "PBXTargetDependency", SettingsNoQuote) << ";\n"
+ << "\t\t\t" << writeSettings("target", aggregate_target_key) << ";\n"
+ << "\t\t};\n";
+
+ project->values("QMAKE_PBX_TARGET_DEPENDS").append(aggregate_target_dep_key);
+ }
+
//TARGET
QString target_key = keyFor(pbx_dir + "QMAKE_PBX_TARGET");
- project->values("QMAKE_PBX_TARGETS").append(target_key);
+ project->values("QMAKE_PBX_TARGETS").prepend(target_key);
t << "\t\t" << target_key << " = {\n"
- << "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES") + project->values("QMAKE_PBX_BUILDPHASES"),
+ << "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_BUILDPHASES"),
SettingsAsList, 4) << ";\n";
t << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";\n";