summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-03 15:53:18 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-03 15:53:18 (GMT)
commit695ce68419d52b9e6762f9bd85cba4f91bd07915 (patch)
treef44900f90ea4e8dcdde0652c0f9d9cc70a97143b /Source
parent687e0d6319ef666345620eb24e8916b272610e51 (diff)
parent44e2923f332653f6b1aad610b314a9edbdf6bf24 (diff)
downloadCMake-695ce68419d52b9e6762f9bd85cba4f91bd07915.zip
CMake-695ce68419d52b9e6762f9bd85cba4f91bd07915.tar.gz
CMake-695ce68419d52b9e6762f9bd85cba4f91bd07915.tar.bz2
Merge branch 'fix-build-crash-on-bad-generator' into release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 4f14d73..7cbc1da 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2667,11 +2667,17 @@ int cmake::Build(const std::string& dir,
}
if(!it.Find("CMAKE_GENERATOR"))
{
- std::cerr << "Error: could find generator in Cache\n";
+ std::cerr << "Error: could not find CMAKE_GENERATOR in Cache\n";
return 1;
}
cmsys::auto_ptr<cmGlobalGenerator> gen(
this->CreateGlobalGenerator(it.GetValue()));
+ if(!gen.get())
+ {
+ std::cerr << "Error: could create CMAKE_GENERATOR \""
+ << it.GetValue() << "\"\n";
+ return 1;
+ }
std::string output;
std::string projName;
if(!it.Find("CMAKE_PROJECT_NAME"))