diff options
author | David Cole <david.cole@kitware.com> | 2012-12-05 15:29:36 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-12-05 15:29:36 (GMT) |
commit | 00dc0ce592285ed990ef9a8e747f1dcde2830866 (patch) | |
tree | 4e882697b97387a65ed0aef389d2721743b9d76b | |
parent | 7c2891daebc971380c1945b5976937eebbf4b79e (diff) | |
parent | 9fc2e20244a2c8b01c23cd06031388aa85e50117 (diff) | |
download | CMake-00dc0ce592285ed990ef9a8e747f1dcde2830866.zip CMake-00dc0ce592285ed990ef9a8e747f1dcde2830866.tar.gz CMake-00dc0ce592285ed990ef9a8e747f1dcde2830866.tar.bz2 |
Merge topic 'ninja_launchers'
9fc2e20 Ninja: fix usage of cldeps with ctest launchers
965358f enable CTEST_USE_LAUNCHERS with Ninja too
-rw-r--r-- | Modules/CTestUseLaunchers.cmake | 2 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake index 6731d37..24f5f2e 100644 --- a/Modules/CTestUseLaunchers.cmake +++ b/Modules/CTestUseLaunchers.cmake @@ -35,7 +35,7 @@ if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT}) CACHE INTERNAL "CTEST_USE_LAUNCHERS initial value from ENV") endif() -if(NOT "${CMAKE_GENERATOR}" MATCHES "Make") +if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja") set(CTEST_USE_LAUNCHERS 0) endif() 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. |