summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-20 14:36:26 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-20 14:37:27 (GMT)
commit2d3aa94225e259c9bc1c0d469e6326b476d225c1 (patch)
treeb88191eb67c139f7a75cb74bfc517962d5c4f6eb /Source/cmGlobalNinjaGenerator.cxx
parent7aa9961939f99c915485d86e460b9941f949d59c (diff)
downloadCMake-2d3aa94225e259c9bc1c0d469e6326b476d225c1.zip
CMake-2d3aa94225e259c9bc1c0d469e6326b476d225c1.tar.gz
CMake-2d3aa94225e259c9bc1c0d469e6326b476d225c1.tar.bz2
cmGlobalGenerator: Allow FindMakeProgram to fail
Revise its signature to return `bool` so that it can fail and abort configuration early.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index b90428d..50550aa 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -553,9 +553,11 @@ void cmGlobalNinjaGenerator::Generate()
this->CloseBuildFileStream();
}
-void cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
+bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
{
- this->cmGlobalGenerator::FindMakeProgram(mf);
+ if (!this->cmGlobalGenerator::FindMakeProgram(mf)) {
+ return false;
+ }
if (const char* ninjaCommand = mf->GetDefinition("CMAKE_MAKE_PROGRAM")) {
this->NinjaCommand = ninjaCommand;
std::vector<std::string> command;
@@ -567,6 +569,7 @@ void cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
this->NinjaVersion = cmSystemTools::TrimWhitespace(version);
this->CheckNinjaFeatures();
}
+ return true;
}
void cmGlobalNinjaGenerator::CheckNinjaFeatures()