summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-13 17:51:10 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-13 18:04:12 (GMT)
commit20278872e3d8145f4aa81ea6cde01144daa3ca8f (patch)
treebc3512decdd77d9be6d6a21aeb9a8252ee6e2943 /Source/cmNinjaNormalTargetGenerator.cxx
parentb99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (diff)
downloadCMake-20278872e3d8145f4aa81ea6cde01144daa3ca8f.zip
CMake-20278872e3d8145f4aa81ea6cde01144daa3ca8f.tar.gz
CMake-20278872e3d8145f4aa81ea6cde01144daa3ca8f.tar.bz2
Ninja: Fix POST_BUILD commands on macOS Frameworks
The condition added by commit v2.8.12~179^2 (OS X: Fix regression handling frameworks for Ninja, 2013-07-16) for excluding use of versioning symlinks on macOS Frameworks must match that used for POST_BUILD selection. Otherwise we place the POST_BUILD commands after a symlink step that is never added. Closes: #16363
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 095c703..6d915ea 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -645,7 +645,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"] = ":";
@@ -687,7 +689,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
commandLineLengthLimit, &usedResponseFile);
this->WriteLinkRule(usedResponseFile);
- if (targetOutput != targetOutputReal && !gt.IsFrameworkOnApple()) {
+ if (symlinkNeeded) {
if (targetType == cmState::EXECUTABLE) {
globalGen.WriteBuild(
this->GetBuildFileStream(),