summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsForAll
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-03-31 05:48:38 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-01 13:52:04 (GMT)
commiteae4eef0c48188027b5c25657054b12b6b301c85 (patch)
tree41f10040e4d1e2878870224ebe7fe75241169f78 /Tests/CPackComponentsForAll
parentb290ddf925aee7dca25396035b1b53223d37e9e5 (diff)
downloadCMake-eae4eef0c48188027b5c25657054b12b6b301c85.zip
CMake-eae4eef0c48188027b5c25657054b12b6b301c85.tar.gz
CMake-eae4eef0c48188027b5c25657054b12b6b301c85.tar.bz2
CPack/RPM external symlink handling
Symbolic links that point to external location no longer cause cmake to fail with string out of bounds error but are instead packaged as non relocatable symlinks and print out a warning message.
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt3
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake3
2 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index 823f6db..05c13a4 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -92,6 +92,9 @@ if("${CPACK_GENERATOR}" MATCHES "RPM")
# test symbolic link to location outside package
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ./outside_package symlink_outside_package)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_outside_package DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
+ # test symbolic link to location outside wdr (packaging directory)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink /outside_package_wdr symlink_outside_wdr)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/symlink_outside_wdr DESTINATION ${CMAKE_INSTALL_LIBDIR}/inside_relocatable_one/depth_two COMPONENT libraries)
endif()
# CPack boilerplate for this project
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 0c5cca8..e956f17 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -188,6 +188,7 @@ if(CPackGen MATCHES "RPM")
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/depth_three
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/depth_three/symlink_parentdir_path
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_outside_package
+/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_outside_wdr
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_relocatable_subpath
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_samedir_path
/usr/foo/bar/lib${LIB_SUFFIX}/inside_relocatable_one/depth_two/symlink_samedir_path_current_dir
@@ -354,6 +355,8 @@ if(CPackGen MATCHES "RPM")
string(REGEX MATCH "^.*${whitespaces}->${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/non_relocatable/depth_two$" check_symlink "${SYMLINK_POINT_}")
elseif("${symlink_name}" STREQUAL "symlink_outside_package")
string(REGEX MATCH "^.*${whitespaces}->${whitespaces}outside_package$" check_symlink "${SYMLINK_POINT_}")
+ elseif("${symlink_name}" STREQUAL "symlink_outside_wdr")
+ string(REGEX MATCH "^.*${whitespaces}->${whitespaces}/outside_package_wdr$" check_symlink "${SYMLINK_POINT_}")
elseif("${symlink_name}" STREQUAL "symlink_other_relocatable_path"
OR "${symlink_name}" STREQUAL "symlink_from_non_relocatable_path"
OR "${symlink_name}" STREQUAL "symlink_relocatable_subpath")