summaryrefslogtreecommitdiffstats
path: root/Modules/Internal
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-14 17:23:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-09-14 17:23:10 (GMT)
commit88e6e35358f0be59d2ceddb77fcb67091110b56c (patch)
tree536d86ff1b1aa9229fa3996c62901153841105d0 /Modules/Internal
parentcff5151822d4f3e68befed01f47013d478e85bcd (diff)
parent8ede35523e6e3b6d562d30a3df7780b66bdbd971 (diff)
downloadCMake-88e6e35358f0be59d2ceddb77fcb67091110b56c.zip
CMake-88e6e35358f0be59d2ceddb77fcb67091110b56c.tar.gz
CMake-88e6e35358f0be59d2ceddb77fcb67091110b56c.tar.bz2
Merge topic 'module_policy_protection'
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2375
Diffstat (limited to 'Modules/Internal')
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake5
-rw-r--r--Modules/Internal/CPack/CPackRPM.cmake5
2 files changed, 10 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 4ef4539..ca3a004 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -10,6 +10,9 @@ if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
endif()
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
function(cpack_deb_variable_fallback OUTPUT_VAR_NAME)
set(FALLBACK_VAR_NAMES ${ARGN})
@@ -579,3 +582,5 @@ function(cpack_deb_prepare_package_vars)
endfunction()
cpack_deb_prepare_package_vars()
+
+cmake_policy(POP)
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake
index 06298d7..3bd5147 100644
--- a/Modules/Internal/CPack/CPackRPM.cmake
+++ b/Modules/Internal/CPack/CPackRPM.cmake
@@ -3,6 +3,9 @@
# Author: Eric Noulard with the help of Alexander Neundorf.
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
function(get_file_permissions FILE RETURN_VAR)
execute_process(COMMAND ls -l ${FILE}
OUTPUT_VARIABLE permissions_
@@ -1865,3 +1868,5 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT
endfunction()
cpack_rpm_generate_package()
+
+cmake_policy(POP)