Commit ea916230 authored by Domen Vrankar's avatar Domen Vrankar Committed by Brad King
Browse files

CPack: Avoid crash on invalid CMake generator name (#15308)

Case where CPACK_CMAKE_GENERATOR value is non existent or
or contains multiple words that were not quoted was not
handled and produced a segmentation fault.
parent c118816d
......@@ -628,6 +628,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmGlobalGenerator* globalGenerator
= this->MakefileMap->GetCMakeInstance()->CreateGlobalGenerator(
if ( !globalGenerator )
"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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment