The old version would admit, for example, a variable named "xxxCPACK".
---
 Modules/CPack.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index ce1536e..532596d 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -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()
-- 
2.1.4

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to