summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kuemmel <syntheticpp@gmx.net>2012-06-14 14:20:49 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-06-14 15:26:01 (GMT)
commiteda30754781a3ef4d3a0e9fa72f1bade50bb6a94 (patch)
tree2fc0ba23e748a4ae2190a2894eb1c7205244d2e5 /Source/cmNinjaNormalTargetGenerator.cxx
parent1d55ea557d30bfb42e5f1a7df431d144d1c9696b (diff)
downloadCMake-eda30754781a3ef4d3a0e9fa72f1bade50bb6a94.zip
CMake-eda30754781a3ef4d3a0e9fa72f1bade50bb6a94.tar.gz
CMake-eda30754781a3ef4d3a0e9fa72f1bade50bb6a94.tar.bz2
Ninja: sh needs something befor and after &&
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 12e871f..22f77f0 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -479,14 +479,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (targetOutput == targetOutputReal) {
vars["POST_BUILD"] = postBuildCmdLine;
+ if (preLinkCmdLines.empty()) {
+ // rule with PRE_LINK will be selected, feed it
+ vars["PRE_LINK"] = locGtor->nopCommand();
+ }
} else {
- vars["POST_BUILD"] = ":";
symlinkVars["POST_BUILD"] = postBuildCmdLine;
}
- if (preLinkCmdLines.empty()) {
- // rule with PRE_LINK will be selected, feed it
- vars["PRE_LINK"] = locGtor->nopCommand();
- }
}
bool suppressShell = preLinkCmdLines.empty() && postBuildCmdLines.empty();
@@ -496,7 +495,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmdLineLimit = 8000;
#else
// cmdLineLimit = ?? TODO
- suppressShell = true;
+ suppressShell = false;
+
+ // TODO also use _NOSHELL rule
+ if (vars.find("PRE_LINK") == vars.end())
+ vars["PRE_LINK"] = locGtor->nopCommand();
+ if (vars.find("POST_BUILD") == vars.end())
+ vars["POST_BUILD"] = locGtor->nopCommand();
+ if (targetOutput != targetOutputReal &&
+ symlinkVars.find("POST_BUILD") == symlinkVars.end())
+ symlinkVars["POST_BUILD"] = locGtor->nopCommand();
#endif
// Write the build statement for this target.
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),