summaryrefslogtreecommitdiffstats
path: root/qmake/generators/mac/pbuilder_pbx.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-12-22 19:57:10 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-26 13:13:23 +0100
commitf6d13a45c88d94a7b616450efe1adb0a231a92c7 (patch)
treeedfa8b6e205cf826503bd89b9fa3c160c72c9b7d /qmake/generators/mac/pbuilder_pbx.cpp
parent0e548b585695f4bcfaaccf289da8124c851d6d94 (diff)
qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode
We already assume that if a source is buildable and should end up in OBJECTS we can let Xcode build it, so we skip this input for the extra compiler. Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'qmake/generators/mac/pbuilder_pbx.cpp')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index d0b7efaca6..4710f7e939 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -557,10 +557,13 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
if (project->isEmpty(ProKey(*it + ".output")))
continue;
- const ProStringList &inputs = project->values(ProKey(*it + ".input"));
- for(int input = 0; input < inputs.size(); ++input) {
- if (project->isEmpty(inputs.at(input).toKey()))
+ ProStringList &inputs = project->values(ProKey(*it + ".input"));
+ int input = 0;
+ while (input < inputs.size()) {
+ if (project->isEmpty(inputs.at(input).toKey())) {
+ ++input;
continue;
+ }
bool duplicate = false;
bool isObj = project->values(ProKey(*it + ".CONFIG")).indexOf("no_link") == -1;
if (!isObj) {
@@ -581,7 +584,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
}
sources.append(ProjectBuilderSources(inputs.at(input).toQString(), true,
QString(), (*it).toQString(), isObj));
+
+ if (isObj) {
+ inputs.removeAt(input);
+ continue;
+ }
}
+
+ ++input;
}
}
}