summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsDEB/CMakeLists.txt
diff options
context:
space:
mode:
authorRaffi Enficiaud <raffi.enficiaud@mines-paris.org>2015-09-18 20:20:42 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2015-09-18 20:20:42 (GMT)
commit7c7874c86ef14f2866d38d5ee85709db6e71d217 (patch)
tree3d2ef67cd3c9c146976e2c93bd80a12d186aba83 /Tests/CPackComponentsDEB/CMakeLists.txt
parente3ace61212db5c960132ef0868f49cf05fe1c021 (diff)
downloadCMake-7c7874c86ef14f2866d38d5ee85709db6e71d217.zip
CMake-7c7874c86ef14f2866d38d5ee85709db6e71d217.tar.gz
CMake-7c7874c86ef14f2866d38d5ee85709db6e71d217.tar.bz2
CPackDeb: preventing md5sum on symlinks
- Direct call to cmSystemTools::ComputeFileMD5 - Avoiding hashing symlinks - Tests
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 ...)