summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-08 15:27:59 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-08 15:27:59 (GMT)
commit65a71a5db2836096c6d6b58749d3c7b118b6b200 (patch)
tree8d894dca2a3a3fa4976f6d9d8207bd5be9c3881d /Source
parent3e206022abede98b60c9932e50034e23ba677d0f (diff)
parent54111286453894beb69ad18a9361edc2a50efc84 (diff)
downloadCMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.zip
CMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.tar.gz
CMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.tar.bz2
Merge topic 'ctest-bad-generator'
54111286 ctest_build: Do not crash on bad generator name
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index f81083a..a5a593a 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -112,6 +112,15 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
this->GlobalGenerator =
this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
cmakeGeneratorName);
+ if(!this->GlobalGenerator)
+ {
+ std::string e = "could not create generator named \"";
+ e += cmakeGeneratorName;
+ e += "\"";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
+ cmSystemTools::SetFatalErrorOccured();
+ return 0;
+ }
}
if(strlen(cmakeBuildConfiguration) == 0)
{