diff options
author | Brad King <brad.king@kitware.com> | 2021-11-17 13:45:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-11-17 13:45:35 (GMT) |
commit | 80eae52410715b5caef6b581b631ada3d2b3a831 (patch) | |
tree | 7a6f2d902624e9b5669be71b2f1e58c9653a04cb /Tests | |
parent | a2da527a07ee934cb7a1c1a74adaf214b2ddb7b9 (diff) | |
parent | 7aa0c129bae47e64a633e32ded64e9ae0d61a85f (diff) | |
download | CMake-80eae52410715b5caef6b581b631ada3d2b3a831.zip CMake-80eae52410715b5caef6b581b631ada3d2b3a831.tar.gz CMake-80eae52410715b5caef6b581b631ada3d2b3a831.tar.bz2 |
Merge topic 'test-target_link_directories-chars'
7aa0c129ba Tests: Fix CMakeCommands.target_link_directories for regex chars in path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6733
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeCommands/target_link_directories/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tests/CMakeCommands/target_link_directories/CMakeLists.txt b/Tests/CMakeCommands/target_link_directories/CMakeLists.txt index bc7b9b2..a5f69f3 100644 --- a/Tests/CMakeCommands/target_link_directories/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_directories/CMakeLists.txt @@ -10,31 +10,31 @@ target_link_directories(target_link_directories PRIVATE) add_library(target_link_directories_2 SHARED EXCLUDE_FROM_ALL LinkDirectoriesLib.c) target_link_directories(target_link_directories_2 PRIVATE /private/dir INTERFACE /interface/dir) get_target_property(result target_link_directories_2 LINK_DIRECTORIES) -if (NOT result MATCHES "/private/dir") +if (NOT result STREQUAL "/private/dir") message(SEND_ERROR "${result} target_link_directories not populated the LINK_DIRECTORIES target property") endif() get_target_property(result target_link_directories_2 INTERFACE_LINK_DIRECTORIES) -if (NOT result MATCHES "/interface/dir") +if (NOT result STREQUAL "/interface/dir") message(SEND_ERROR "target_link_directories not populated the INTERFACE_LINK_DIRECTORIES target property of shared library") endif() add_library(target_link_directories_3 STATIC EXCLUDE_FROM_ALL LinkDirectoriesLib.c) target_link_directories(target_link_directories_3 INTERFACE /interface/dir) get_target_property(result target_link_directories_3 INTERFACE_LINK_DIRECTORIES) -if (NOT result MATCHES "/interface/dir") +if (NOT result STREQUAL "/interface/dir") message(SEND_ERROR "target_link_directories not populated the INTERFACE_LINK_DIRECTORIES target property of static library") endif() add_library(target_link_directories_4 SHARED EXCLUDE_FROM_ALL LinkDirectoriesLib.c) target_link_directories(target_link_directories_4 PRIVATE relative/dir) get_target_property(result target_link_directories_4 LINK_DIRECTORIES) -if (NOT result MATCHES "${CMAKE_CURRENT_SOURCE_DIR}/relative/dir") +if (NOT result STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/relative/dir") message(SEND_ERROR "target_link_directories not populated the LINK_DIRECTORIES with relative path") endif() add_subdirectory(subdir) target_link_directories(target_link_directories_5 PRIVATE relative/dir) get_target_property(result target_link_directories_5 LINK_DIRECTORIES) -if (NOT result MATCHES "${CMAKE_CURRENT_SOURCE_DIR}/relative/dir") +if (NOT result STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/relative/dir") message(SEND_ERROR "target_link_directories not populated the LINK_DIRECTORIES with relative path") endif() |