Merge topic 'ninja-framework-POST_BUILD'

20278872 Ninja: Fix POST_BUILD commands on macOS Frameworks
This commit is contained in:
Brad King
2016-10-14 09:02:43 -04:00
committed by CMake Topic Stage
2 changed files with 9 additions and 2 deletions
+4 -2
View File
@@ -652,7 +652,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
std::string postBuildCmdLine = localGen.BuildCommandLine(postBuildCmdLines);
cmNinjaVars symlinkVars;
if (targetOutput == targetOutputReal) {
bool const symlinkNeeded =
(targetOutput != targetOutputReal && !gt.IsFrameworkOnApple());
if (!symlinkNeeded) {
vars["POST_BUILD"] = postBuildCmdLine;
} else {
vars["POST_BUILD"] = ":";
@@ -694,7 +696,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
commandLineLengthLimit, &usedResponseFile);
this->WriteLinkRule(usedResponseFile);
if (targetOutput != targetOutputReal && !gt.IsFrameworkOnApple()) {
if (symlinkNeeded) {
if (targetType == cmState::EXECUTABLE) {
globalGen.WriteBuild(
this->GetBuildFileStream(),