summaryrefslogtreecommitdiffstats
path: root/Tests/Plugin/check_mod_soname.cmake
diff options
context:
space:
mode:
authorFelix Geyer <fgeyer@debian.org>2015-08-20 12:13:28 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-20 14:45:09 (GMT)
commitf799ffb5cb895855ac2aba54765622b81db5be38 (patch)
tree211d48c7fa168fe7945939de227a396302e65dce /Tests/Plugin/check_mod_soname.cmake
parent899458ab20876aeea915a59e9bfb459d92d264de (diff)
downloadCMake-f799ffb5cb895855ac2aba54765622b81db5be38.zip
CMake-f799ffb5cb895855ac2aba54765622b81db5be38.tar.gz
CMake-f799ffb5cb895855ac2aba54765622b81db5be38.tar.bz2
Do not set SONAME for MODULE library targets (#15705)
The SONAME field is only useful for shared libraries that application link against.
Diffstat (limited to 'Tests/Plugin/check_mod_soname.cmake')
-rw-r--r--Tests/Plugin/check_mod_soname.cmake17
1 files changed, 5 insertions, 12 deletions
diff --git a/Tests/Plugin/check_mod_soname.cmake b/Tests/Plugin/check_mod_soname.cmake
index 3737b45..21a33b1 100644
--- a/Tests/Plugin/check_mod_soname.cmake
+++ b/Tests/Plugin/check_mod_soname.cmake
@@ -1,14 +1,7 @@
-execute_process(COMMAND ${readelf} -d ${mod1} OUTPUT_FILE ${mod1}.readelf.txt)
-execute_process(COMMAND ${readelf} -d ${mod2} OUTPUT_FILE ${mod2}.readelf.txt)
-file(STRINGS ${mod1}.readelf.txt soname1 REGEX "\\(SONAME\\)")
-file(STRINGS ${mod2}.readelf.txt soname2 REGEX "\\(SONAME\\)")
-if(soname1)
- message(STATUS "${mod1} has soname as expected: ${soname1}")
+execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt)
+file(STRINGS ${mod}.readelf.txt soname REGEX "\\(SONAME\\)")
+if(soname)
+ message(FATAL_ERROR "${mod} has soname but should not:\n ${soname}")
else()
- message(FATAL_ERROR "${mod1} has no soname but should:\n ${soname1}")
-endif()
-if(soname2)
- message(FATAL_ERROR "${mod2} has soname but should not:\n ${soname2}")
-else()
- message(STATUS "${mod2} has no soname as expected")
+ message(STATUS "${mod} has no soname as expected")
endif()