summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsDEB/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-21 13:25:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-21 13:25:31 (GMT)
commit38830fc0cabb742cf95160429cc99cdb5326cce7 (patch)
tree37b2f4d88d6ff3d4dd03e79739769591068cbeca /Tests/CPackComponentsDEB/CMakeLists.txt
parentdd8285c6880e08e4c6cbb0e2ca1a1684df3e11d1 (diff)
parentda295f450da2781e82632b6a5df29df6fbf7daad (diff)
downloadCMake-38830fc0cabb742cf95160429cc99cdb5326cce7.zip
CMake-38830fc0cabb742cf95160429cc99cdb5326cce7.tar.gz
CMake-38830fc0cabb742cf95160429cc99cdb5326cce7.tar.bz2
Merge topic 'cpack-deb-checksum-on-symlinks'
da295f45 CPack/Deb: checksum on symlinks release notes 7c7874c8 CPackDeb: preventing md5sum on symlinks
Diffstat (limited to 'Tests/CPackComponentsDEB/CMakeLists.txt')
-rw-r--r--Tests/CPackComponentsDEB/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CPackComponentsDEB/CMakeLists.txt b/Tests/CPackComponentsDEB/CMakeLists.txt
index 5a5d626..98ed911 100644
--- a/Tests/CPackComponentsDEB/CMakeLists.txt
+++ b/Tests/CPackComponentsDEB/CMakeLists.txt
@@ -99,6 +99,25 @@ if(CHMOD_PROG)
set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
endif()
+# creates a symbolic link and a directory. Those should not be hashed.
+# warning: relocation of the symlink is not supported (symlinks with relative
+# paths)
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink mylibapp symtest)
+install(FILES ${CPackComponentsDEB_BINARY_DIR}/symtest
+ DESTINATION bin
+ COMPONENT applications)
+
+if(EXISTS "./dirtest")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ./dirtest)
+endif()
+execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ./dirtest)
+# BUG: apparently cannot add an empty directory
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../mylibapp ./dirtest/symtest)
+# NOTE: we should not add the trailing "/" to dirtest
+install(DIRECTORY ${CPackComponentsDEB_BINARY_DIR}/dirtest
+ DESTINATION bin/
+ COMPONENT applications)
+
# We may use the CPack specific config file in order
# to tailor CPack behavior on a CPack generator specific way
# (Behavior would be different for RPM or TGZ or DEB ...)