summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-14 15:33:30 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-14 15:33:30 (GMT)
commit46eae529685bed736736713914d119fcab6e0a5c (patch)
tree06682bbc528372468735507d3cefe7d10272c1e3
parent8909d887389887171f7846cb3040c575e6262b04 (diff)
parentea916230efeb59938b04f9286a56ea9db1a3af6c (diff)
downloadCMake-46eae529685bed736736713914d119fcab6e0a5c.zip
CMake-46eae529685bed736736713914d119fcab6e0a5c.tar.gz
CMake-46eae529685bed736736713914d119fcab6e0a5c.tar.bz2
Merge branch 'backport-cpack_invalid_cmake_generator' into release
-rw-r--r--Source/CPack/cmCPackGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 1461bb1..84e6482 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -628,6 +628,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmGlobalGenerator* globalGenerator
= this->MakefileMap->GetCMakeInstance()->CreateGlobalGenerator(
cmakeGenerator);
+ if ( !globalGenerator )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Specified package generator not found. "
+ "CPACK_CMAKE_GENERATOR value is invalid."
+ << std::endl);
+ return 0;
+ }
// set the global flag for unix style paths on cmSystemTools as
// soon as the generator is set. This allows gmake to be used
// on windows.