summaryrefslogtreecommitdiffstats
path: root/Modules/CPackDeb.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2017-03-25 20:01:59 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2017-12-09 11:50:28 (GMT)
commit93d5f464cc9cdf4a3b30565828ce23065ce51d01 (patch)
tree48033517d8bda79f0382ad1e6b4f81a948a1eda0 /Modules/CPackDeb.cmake
parent0fe1966b7994969c2220efbec51bf49c0406fac8 (diff)
downloadCMake-93d5f464cc9cdf4a3b30565828ce23065ce51d01.zip
CMake-93d5f464cc9cdf4a3b30565828ce23065ce51d01.tar.gz
CMake-93d5f464cc9cdf4a3b30565828ce23065ce51d01.tar.bz2
CPack: enable all CMake policies for generator scripts
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r--Modules/CPackDeb.cmake28
1 files changed, 8 insertions, 20 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 91bf2f2..de1df3d 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -610,12 +610,7 @@ function(cpack_deb_prepare_package_vars)
if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OR CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS)
# Generating binary list - Get type of all install files
- cmake_policy(PUSH)
- # Tell file(GLOB_RECURSE) not to follow directory symlinks
- # even if the project does not set this policy to NEW.
- cmake_policy(SET CMP0009 NEW)
- file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*")
- cmake_policy(POP)
+ file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*")
find_program(FILE_EXECUTABLE file)
if(NOT FILE_EXECUTABLE)
@@ -931,13 +926,10 @@ function(cpack_deb_prepare_package_vars)
if(CPACK_DEBIAN_ARCHIVE_TYPE)
set(archive_types_ "paxr;gnutar")
- cmake_policy(PUSH)
- cmake_policy(SET CMP0057 NEW)
- if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_)
- message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported"
- "type ${CPACK_DEBIAN_ARCHIVE_TYPE}")
- endif()
- cmake_policy(POP)
+ if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_)
+ message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported"
+ "type ${CPACK_DEBIAN_ARCHIVE_TYPE}")
+ endif()
else()
set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr")
endif()
@@ -1039,13 +1031,9 @@ function(cpack_deb_prepare_package_vars)
set(CPACK_OUTPUT_FILE_NAME
"${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
else()
- cmake_policy(PUSH)
- cmake_policy(SET CMP0010 NEW)
- if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)")
- cmake_policy(POP)
- message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!")
- endif()
- cmake_policy(POP)
+ if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)")
+ message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!")
+ endif()
set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}")
endif()