diff options
author | Brad King <brad.king@kitware.com> | 2021-03-04 20:50:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-08 18:03:21 (GMT) |
commit | 7621861f30992bdaddb66a7f3e5dce6eec4545bd (patch) | |
tree | 1da0732928fb86d3d8b7b4777052b062f9735152 /Tests/LibName | |
parent | 388eb83c098400cb63493896e12b05d685040147 (diff) | |
download | CMake-7621861f30992bdaddb66a7f3e5dce6eec4545bd.zip CMake-7621861f30992bdaddb66a7f3e5dce6eec4545bd.tar.gz CMake-7621861f30992bdaddb66a7f3e5dce6eec4545bd.tar.bz2 |
Tests: Update LibName to cover spaces in shared library name
Diffstat (limited to 'Tests/LibName')
-rw-r--r-- | Tests/LibName/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/LibName/use_ver_space.c | 9 | ||||
-rw-r--r-- | Tests/LibName/ver_space.c | 7 |
3 files changed, 24 insertions, 0 deletions
diff --git a/Tests/LibName/CMakeLists.txt b/Tests/LibName/CMakeLists.txt index 3ac125f..b8f0890 100644 --- a/Tests/LibName/CMakeLists.txt +++ b/Tests/LibName/CMakeLists.txt @@ -24,3 +24,11 @@ set_target_properties(verFoo PROPERTIES VERSION 3.1.4 SOVERSION 3) add_executable(verFoobar foobar.c) target_link_libraries(verFoobar verFoo) + +if(MAKE_SUPPORTS_SPACES AND NOT CMAKE_GENERATOR STREQUAL "Watcom WMake") + # check with lib version and space + add_library(ver_space SHARED ver_space.c) + set_target_properties(ver_space PROPERTIES VERSION 3.1.4 SOVERSION 3 OUTPUT_NAME "ver space") + add_executable(use_ver_space use_ver_space.c) + target_link_libraries(use_ver_space ver_space) +endif() diff --git a/Tests/LibName/use_ver_space.c b/Tests/LibName/use_ver_space.c new file mode 100644 index 0000000..a6a733d --- /dev/null +++ b/Tests/LibName/use_ver_space.c @@ -0,0 +1,9 @@ +#ifdef _WIN32 +__declspec(dllimport) +#endif + int ver_space(void); + +int main(void) +{ + return ver_space(); +} diff --git a/Tests/LibName/ver_space.c b/Tests/LibName/ver_space.c new file mode 100644 index 0000000..669a3b5 --- /dev/null +++ b/Tests/LibName/ver_space.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif + int ver_space(void) +{ + return 0; +} |