summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-09-19 22:17:54 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-20 12:30:29 (GMT)
commitedb3f6eee4babe2efab6d50b8bec75d839b6a1c5 (patch)
treeb162b1da96e51a70b09095e42f85fe2947338192
parent5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (diff)
downloadCMake-edb3f6eee4babe2efab6d50b8bec75d839b6a1c5.zip
CMake-edb3f6eee4babe2efab6d50b8bec75d839b6a1c5.tar.gz
CMake-edb3f6eee4babe2efab6d50b8bec75d839b6a1c5.tar.bz2
CPackRPM: Avoid CMP0007 warnings
For older versions of CMake minimum required version CMP0007 policy warning was printed out.
-rw-r--r--Modules/CPackRPM.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 36caac6..90b3943 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -847,7 +847,10 @@ function(cpack_rpm_prepare_content_list)
set(_DISTINCT_PATH "${_RPM_RELOCATION_PREFIX}")
string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS " ${_RPM_RELOCATION_PREFIX}")
- list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0007 NEW)
+ list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+ cmake_policy(POP)
unset(_TMP_LIST)
# Now generate all of the parent dirs of the relocation path
foreach(_PREFIX_PATH_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS})