diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2017-10-28 22:16:06 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2017-10-28 22:20:54 (GMT) |
commit | 5784ab8fcab556d4d73b15b7d84bf167daf4c5a2 (patch) | |
tree | a2466de084ae6eb2b46abfee6b2de0c17b4d02cf /Tests/RunCMake/CPack | |
parent | ced94bcbd91b9ff486367f5187cf5760c02a707b (diff) | |
download | CMake-5784ab8fcab556d4d73b15b7d84bf167daf4c5a2.zip CMake-5784ab8fcab556d4d73b15b7d84bf167daf4c5a2.tar.gz CMake-5784ab8fcab556d4d73b15b7d84bf167daf4c5a2.tar.bz2 |
CPack/Deb: handle shlibs file generation when SOVERSION set to 0
Setting CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS did not
auto generate shlibs control file when .so version
of the library was set to 0.
Fixes #17318
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r-- | Tests/RunCMake/CPack/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/VerifyResult.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/test.cmake | 7 |
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) |