Commit 9ecee256 authored by Brad King's avatar Brad King
Browse files

Xcode: Revert addition of "outputPaths" to custom command build phase

The change in commit v3.9.0~3^2 (Xcode: Add "outputPaths" to custom
command script build phase, 2017-07-13) was meant to support Xcode 9's
new build system.  However, without matching "inputPaths", Xcode will
not re-run the build phase if its outputs have already been generated.
This broke the old Xcode build system too.

Revert the change for now so at least the old Xcode build system works.
Further investigation will be needed to add proper support for Xcode 9's
new build system.

Fixes: #17178
parent 3f17ccce
......@@ -34,8 +34,6 @@ Generators
This is an experimental feature and can be activated by setting the
:variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value.
* The :generator:`Xcode` generator now supports Xcode 9.
......@@ -337,3 +335,8 @@ Changes made since CMake 3.9.0 include the following.
* On macOS, the default application bundle ``Info.plist`` file no longer
enables Hi-DPI support as it did in 3.9.0 and 3.9.1. The change had
to be reverted because it broke iOS applications.
* The Xcode generator no longer adds "outputPaths" to custom script
build phases as it did in 3.9.0 and 3.9.1. This was added in an
attempt to support Xcode 9's new build system, but broke incremental
rebuilds for both the old and new Xcode build systems.
......@@ -1517,17 +1517,6 @@ void cmGlobalXCodeGenerator::AddCommandsToBuildPhase(
makecmd += " all";
buildphase->AddAttribute("shellScript", this->CreateString(makecmd));
buildphase->AddAttribute("showEnvVarsInLog", this->CreateString("0"));
cmXCodeObject* outputFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
for (std::vector<cmCustomCommand>::const_iterator i = commands.begin();
i != commands.end(); ++i) {
std::vector<std::string> const& outputs = i->GetOutputs();
for (std::vector<std::string>::const_iterator j = outputs.begin();
j != outputs.end(); ++j) {
buildphase->AddAttribute("outputPaths", outputFiles);
void cmGlobalXCodeGenerator::CreateCustomRulesMakefile(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment