summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-04 13:18:46 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-06-04 13:18:46 (GMT)
commit99d6fa0aa108c7d757111c8528e11e6c9272beb5 (patch)
tree4a289c250a2a211670e64a344534782fdd8eb2fa /Source/cmake.cxx
parenta1e742c3b0b451f3477ab0bc56781d8035ddb029 (diff)
parent44e2923f332653f6b1aad610b314a9edbdf6bf24 (diff)
downloadCMake-99d6fa0aa108c7d757111c8528e11e6c9272beb5.zip
CMake-99d6fa0aa108c7d757111c8528e11e6c9272beb5.tar.gz
CMake-99d6fa0aa108c7d757111c8528e11e6c9272beb5.tar.bz2
Merge topic 'fix-build-crash-on-bad-generator'
44e2923f cmake: Fix --build crash on bad CMAKE_GENERATOR in cache
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 60e92a0..9906c4b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2726,11 +2726,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"))