diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-09-19 22:17:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-20 12:30:29 (GMT) |
commit | edb3f6eee4babe2efab6d50b8bec75d839b6a1c5 (patch) | |
tree | b162b1da96e51a70b09095e42f85fe2947338192 | |
parent | 5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (diff) | |
download | CMake-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.cmake | 5 |
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}) |