diff options
author | Brad King <brad.king@kitware.com> | 2015-05-20 13:10:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-20 15:20:42 (GMT) |
commit | 6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6 (patch) | |
tree | 051865c2b01f491e3472f577f39a13080d55be43 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 594dd9b36a7f3ac37b56c89596ff38451570de3e (diff) | |
download | CMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.zip CMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.tar.gz CMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.tar.bz2 |
Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
This is much simpler than finding a way to lookup "CMAKE_COMMAND"
everywhere.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index e064b84..24fe16e 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -330,12 +330,10 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule() { cmLocalGenerator *lg = this->LocalGenerators[0]; - cmMakefile* mfRoot = lg->GetMakefile(); std::ostringstream cmd; - cmd << lg->ConvertToOutputFormat( - mfRoot->GetRequiredDefinition("CMAKE_COMMAND"), - cmLocalGenerator::SHELL) + cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(), + cmLocalGenerator::SHELL) << " -E copy $in $out"; this->AddRule("COPY_OSX_CONTENT", @@ -1185,9 +1183,8 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) cmMakefile* mfRoot = lg->GetMakefile(); std::ostringstream cmd; - cmd << lg->ConvertToOutputFormat( - mfRoot->GetRequiredDefinition("CMAKE_COMMAND"), - cmLocalGenerator::SHELL) + cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(), + cmLocalGenerator::SHELL) << " -H" << lg->ConvertToOutputFormat(mfRoot->GetHomeDirectory(), cmLocalGenerator::SHELL) |