CPack: be more stringent when selecting variables to encode

The old version would admit, for example, a variable named "xxxCPACK".
This commit is contained in:
Роман Донченко 2015-03-01 02:38:52 +03:00 committed by Brad King
parent 56be75b310
commit 3b9f963f3f
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ macro(cpack_encode_variables)
set(_CPACK_OTHER_VARIABLES_)
get_cmake_property(res VARIABLES)
foreach(var ${res})
if("xxx${var}" MATCHES "xxxCPACK")
if(var MATCHES "^CPACK")
set(_CPACK_OTHER_VARIABLES_
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
endif()