summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Gaunard <mathias@gaunard.com>2012-11-30 02:38:25 (GMT)
committerMathias Gaunard <mathias@gaunard.com>2012-11-30 02:46:55 (GMT)
commit9fc2e20244a2c8b01c23cd06031388aa85e50117 (patch)
tree322c88a912dab1ca1a8327e5597c0094d99b5c78
parent965358fcf64cf1a3693bcdd66f723729e0614ef6 (diff)
downloadCMake-9fc2e20244a2c8b01c23cd06031388aa85e50117.zip
CMake-9fc2e20244a2c8b01c23cd06031388aa85e50117.tar.gz
CMake-9fc2e20244a2c8b01c23cd06031388aa85e50117.tar.bz2
Ninja: fix usage of cldeps with ctest launchers
-rw-r--r--Source/cmNinjaTargetGenerator.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5b1dfc8..15842e4 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -423,17 +423,19 @@ cmNinjaTargetGenerator
std::vector<std::string> compileCmds;
cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
+ if(useClDeps)
+ {
+ std::string cmdPrefix = clDepsBinary + lang + " $in \"$DEP_FILE\" $out " +
+ clShowPrefix + clBinary;
+ compileCmds.front().insert(0, cmdPrefix);
+ }
+
for (std::vector<std::string>::iterator i = compileCmds.begin();
i != compileCmds.end(); ++i)
this->GetLocalGenerator()->ExpandRuleVariables(*i, vars);
- std::string cmdLine;
- if(useClDeps)
- {
- cmdLine = clDepsBinary + lang + " $in \"$DEP_FILE\" $out " +
- clShowPrefix + clBinary;
- }
- cmdLine += this->GetLocalGenerator()->BuildCommandLine(compileCmds);
+ std::string cmdLine =
+ this->GetLocalGenerator()->BuildCommandLine(compileCmds);
// Write the rule for compiling file of the given language.