Merge branch 'backport-cpack_invalid_cmake_generator' into release

This commit is contained in:
Brad King 2015-01-14 10:33:30 -05:00
commit 46eae52968
1 changed files with 8 additions and 0 deletions

View File

@ -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.