summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-30 12:55:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-30 12:55:36 (GMT)
commit58e0692b62b5be1703142e8d7cc2373c8cee7508 (patch)
tree0eac0dbb7e527f2871e7f7363147c18607cb4205 /Tests
parente48397ee2930090ff41c8febeea27542b4580ec0 (diff)
parent5784ab8fcab556d4d73b15b7d84bf167daf4c5a2 (diff)
downloadCMake-58e0692b62b5be1703142e8d7cc2373c8cee7508.zip
CMake-58e0692b62b5be1703142e8d7cc2373c8cee7508.tar.gz
CMake-58e0692b62b5be1703142e8d7cc2373c8cee7508.tar.bz2
Merge topic 'cpack-deb-0-so-version-support'
5784ab8f CPack/Deb: handle shlibs file generation when SOVERSION set to 0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1423
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake7
3 files changed, 13 insertions, 3 deletions
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index aa55c44..b00e373 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -12,7 +12,7 @@ run_cpack_test(DIST "RPM" false "MONOLITHIC")
run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true "MONOLITHIC;COMPONENT")
run_cpack_test(VERSION "RPM;DEB" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB" false "COMPONENT")
-run_cpack_test(GENERATE_SHLIBS "DEB" true "COMPONENT")
+run_cpack_test_subtests(GENERATE_SHLIBS "soversion_not_zero;soversion_zero" "DEB" true "COMPONENT")
run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true "COMPONENT")
run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
diff --git a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake
index b1952ef..8cefeea 100644
--- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake
@@ -1,4 +1,9 @@
-set(shlibs_shlibs "^libtest_lib 0\\.8 generate_shlibs \\(\\= 0\\.1\\.1\\)\n$")
+if(RunCMake_SUBTEST_SUFFIX STREQUAL "soversion_not_zero")
+ set(shlibs_shlibs "^libtest_lib 0\\.8 generate_shlibs \\(\\= 0\\.1\\.1\\)\n$")
+else() # soversion_zero
+ set(shlibs_shlibs "^libtest_lib 0 generate_shlibs \\(\\= 0\\.1\\.1\\)\n$")
+endif()
+
# optional dot at the end of permissions regex is for SELinux enabled systems
set(shlibs_shlibs_permissions_regex "-rw-r--r--\.? .*")
verifyDebControl("${FOUND_FILE_1}" "shlibs" "shlibs")
diff --git a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake
index 90351ba..e0eb67b 100644
--- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake
@@ -9,6 +9,11 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp"
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp"
"#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n")
add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp")
-set_target_properties(test_lib PROPERTIES SOVERSION "0.8")
+
+if(RunCMake_SUBTEST_SUFFIX STREQUAL "soversion_not_zero")
+ set_target_properties(test_lib PROPERTIES SOVERSION "0.8")
+else() # soversion_zero
+ set_target_properties(test_lib PROPERTIES SOVERSION "0")
+endif()
install(TARGETS test_lib DESTINATION foo COMPONENT libs)