summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Export
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-20 14:37:18 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-20 14:38:34 (GMT)
commit899458ab20876aeea915a59e9bfb459d92d264de (patch)
tree522da6dbe491f7ed45e72273d675137e2478be12 /Tests/ExportImport/Export
parente72a5b2c0b51f90970fc4ef27969cee9990be862 (diff)
downloadCMake-899458ab20876aeea915a59e9bfb459d92d264de.zip
CMake-899458ab20876aeea915a59e9bfb459d92d264de.tar.gz
CMake-899458ab20876aeea915a59e9bfb459d92d264de.tar.bz2
Tests: Cover NO_SONAME property for SHARED libraries
This property was added by commit v2.8.9~204^2~2 (Support building shared libraries or modules without soname, 2012-04-22). A test for using the property on MODULE libraries was added by commit v2.8.9~204^2~1 (Test NO_SONAME property, 2012-04-23). Add such a test for SHARED libraries too.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt5
-rw-r--r--Tests/ExportImport/Export/testLibNoSONAME.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 7fdfaa8..2b9e844 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -127,6 +127,9 @@ target_link_libraries(testLibCycleA testLibCycleB)
target_link_libraries(testLibCycleB testLibCycleA)
set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3)
+add_library(testLibNoSONAME SHARED testLibNoSONAME.c)
+set_property(TARGET testLibNoSONAME PROPERTY NO_SONAME 1)
+
# Test exporting dependent libraries into different exports
add_library(testLibRequired testLibRequired.c)
add_library(testLibDepends testLibDepends.c)
@@ -467,6 +470,7 @@ install(
testExe2lib testLib4lib testLib4libdbg testLib4libopt
testLib6 testLib7
testLibCycleA testLibCycleB
+ testLibNoSONAME
cmp0022NEW cmp0022OLD
systemlib
EXPORT exp
@@ -527,6 +531,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
export(TARGETS testExe2 testLib4 testLib5 testLib6 testLib7 testExe3 testExe4 testExe2lib
testLib4lib testLib4libdbg testLib4libopt
testLibCycleA testLibCycleB
+ testLibNoSONAME
testLibPerConfigDest
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Export/testLibNoSONAME.c b/Tests/ExportImport/Export/testLibNoSONAME.c
new file mode 100644
index 0000000..2193e1f
--- /dev/null
+++ b/Tests/ExportImport/Export/testLibNoSONAME.c
@@ -0,0 +1,7 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define testLibNoSONAME_EXPORT __declspec(dllexport)
+#else
+# define testLibNoSONAME_EXPORT
+#endif
+
+testLibNoSONAME_EXPORT int testLibNoSONAME(void) { return 0; }