summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorNikolay Avtomonov <n.avtomonov@readyforsky.com>2018-10-02 17:40:29 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-07 21:52:40 +0000
commit6d12687afdc8d94530f732593b85eb0f3beffddf (patch)
treea32ed7d27c6f44f032998b5569590394afa1a3e9 /qmake
parent0ae0f2bdd87ce7a24674864391d1ef04a1006672 (diff)
Explicitly set output files for qtpreprocess
This fixes build error with XCode 10. XCode 10 build system (a.k.a "New Build System") requires all the files that are generated by scripts and used later on build to be explicitly defined as output files. Task-number: QTBUG-71035 Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3f0858ed10d249acb942597b4065080411281b87) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 39e4148e0a..5b3ebe042c 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -778,6 +778,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
{
QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak";
QFile mkf(mkfile);
+ ProStringList outputPaths;
if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) {
writingUnixMakefileGenerator = true;
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
@@ -827,8 +828,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
++added;
const QString file_name = fileFixify(fn, FileFixifyFromOutdir);
const QString tmpOut = fileFixify(tmp_out.first().toQString(), FileFixifyFromOutdir);
- mkt << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
+ QString path = escapeDependencyPath(Option::fixPathToTargetOS(
replaceExtraCompilerVariables(tmpOut, file_name, QString(), NoShell)));
+ mkt << ' ' << path;
+ outputPaths << path;
}
}
}
@@ -839,6 +842,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
mkt.flush();
mkf.close();
}
+ // Remove duplicates from build steps with "combine"
+ outputPaths.removeDuplicates();
mkfile = fileFixify(mkfile);
QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET");
// project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
@@ -849,6 +854,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";\n"
+ << "\t\t\t" << writeSettings("outputPaths", outputPaths, SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n"
<< "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(Option::output_dir)
+ " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n"