diff options
author | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-15 10:14:13 (GMT) |
---|---|---|
committer | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-15 10:14:13 (GMT) |
commit | 2fb07fc44c49da70a609fbc0df013c0301e9f36a (patch) | |
tree | b0df34212593867478c577962699b33afab20cd7 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 518c06585b07c1b7a189374c9196fc1a7fc3502d (diff) | |
download | CMake-2fb07fc44c49da70a609fbc0df013c0301e9f36a.zip CMake-2fb07fc44c49da70a609fbc0df013c0301e9f36a.tar.gz CMake-2fb07fc44c49da70a609fbc0df013c0301e9f36a.tar.bz2 |
Ninja: Eclipse and KDevelop fixes for ninja
Thx to Claus Klein
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 30a4a07..5c9f039 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -928,11 +928,22 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) cmNinjaDeps()); } +std::string cmGlobalNinjaGenerator::ninjaCmd() const +{ + cmLocalGenerator* lgen = this->LocalGenerators[0]; + if (lgen) { + return lgen->ConvertToOutputFormat( + lgen->GetMakefile()->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"), + cmLocalGenerator::SHELL); + } + return "ninja"; +} + void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) { WriteRule(*this->RulesFileStream, "CLEAN", - "ninja -t clean", + (ninjaCmd() + " -t clean").c_str(), "Cleaning all built files...", "Rule for cleaning all built files.", /*depfile=*/ "", @@ -953,7 +964,7 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os) { WriteRule(*this->RulesFileStream, "HELP", - "ninja -t targets", + (ninjaCmd() + " -t tagets").c_str(), "All primary targets available:", "Rule for printing all primary targets available.", /*depfile=*/ "", |