diff options
author | Brad King <brad.king@kitware.com> | 2023-12-07 15:13:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-12-07 15:15:12 (GMT) |
commit | 7598ea5389e04862c567b43d7c08fbbc66512f37 (patch) | |
tree | d7ea82b36f63384ee0c30c8abb93c42d4ace5bd6 /Tests/RunCMake/find_library | |
parent | dba19350594e17a64d4ce8ec0f3f8641e9b17229 (diff) | |
download | CMake-7598ea5389e04862c567b43d7c08fbbc66512f37.zip CMake-7598ea5389e04862c567b43d7c08fbbc66512f37.tar.gz CMake-7598ea5389e04862c567b43d7c08fbbc66512f37.tar.bz2 |
Tests: Add case covering find_library behavior when targeting MSVC ABI
Diffstat (limited to 'Tests/RunCMake/find_library')
4 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_library/RunCMakeTest.cmake b/Tests/RunCMake/find_library/RunCMakeTest.cmake index 0bed252..f9c8528 100644 --- a/Tests/RunCMake/find_library/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_library/RunCMakeTest.cmake @@ -24,6 +24,10 @@ if(CMAKE_HOST_WIN32 AND MINGW) run_cmake(MSYSTEM_PREFIX) endif() +if(CMAKE_HOST_WIN32 AND MSVC) + run_cmake(Windows-MSVC) +endif() + run_cmake_script(FromScriptMode "-DTEMP_DIR=${RunCMake_BINARY_DIR}/FromScriptMode-temp") run_cmake_with_options(FromPATHEnvDebugVar --debug-find-var=CREATED_LIBRARY) diff --git a/Tests/RunCMake/find_library/Windows-MSVC-stdout.txt b/Tests/RunCMake/find_library/Windows-MSVC-stdout.txt new file mode 100644 index 0000000..af5c30b --- /dev/null +++ b/Tests/RunCMake/find_library/Windows-MSVC-stdout.txt @@ -0,0 +1 @@ +-- STATIC_LIBRARY='[^']*/Tests/RunCMake/find_library/Windows-MSVC/static.lib' diff --git a/Tests/RunCMake/find_library/Windows-MSVC.cmake b/Tests/RunCMake/find_library/Windows-MSVC.cmake new file mode 100644 index 0000000..212f2c4 --- /dev/null +++ b/Tests/RunCMake/find_library/Windows-MSVC.cmake @@ -0,0 +1,4 @@ +enable_language(C) + +find_library(STATIC_LIBRARY NAMES static NO_DEFAULT_PATH PATHS ${CMAKE_CURRENT_SOURCE_DIR}/Windows-MSVC) +message(STATUS "STATIC_LIBRARY='${STATIC_LIBRARY}'") diff --git a/Tests/RunCMake/find_library/Windows-MSVC/static.lib b/Tests/RunCMake/find_library/Windows-MSVC/static.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_library/Windows-MSVC/static.lib |