diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 2 | ||||
-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 |
4 files changed, 26 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c3652fe..3a05317 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -828,6 +828,8 @@ if(BUILD_TESTING) ${build_generator_args} --build-project LibName --build-exe-dir "${CMake_BINARY_DIR}/Tests/LibName/lib" + --build-options + -DMAKE_SUPPORTS_SPACES=${MAKE_SUPPORTS_SPACES} --test-command foobar ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LibName") 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; +} |