summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-14 00:05:03 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-03 22:05:55 (GMT)
commit455aed3061a07f79c8af3c7bd68ebbdcd62e28eb (patch)
tree91369a0c35339189ac84f9683b4adeb748ec1fa2 /Tests
parent78b7ba64941cf6341939a85bd95b79692910cf77 (diff)
downloadCMake-455aed3061a07f79c8af3c7bd68ebbdcd62e28eb.zip
CMake-455aed3061a07f79c8af3c7bd68ebbdcd62e28eb.tar.gz
CMake-455aed3061a07f79c8af3c7bd68ebbdcd62e28eb.tar.bz2
LinkerId: Fix detection of linker tool for MSVC
Previously we matched an entire build system output line and then extracted the relevant portion in a separate brittle step. Match it directly. Use the `CMAKE_LINKER` value directly if available.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
index 403d2e7..8d6c739 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -173,9 +173,9 @@ foreach(t ${targets})
# File format
# file(WRITE ${outfile} "libs=${implicit_libs}\ndirs=${idirs}\nlibrary_arch=${library_arch}\nlinker_tool=${linker_tool}\n")
- if(NOT CMAKE_HOST_WIN32)
+ if(t MATCHES "windows" AND NOT CMAKE_HOST_WIN32)
string(REPLACE "\\" "/" linker_tool "${linker_tool}")
- cmake_path(SET linker_tool "${linker_tool}")
+ cmake_path(NORMAL_PATH linker_tool)
endif()
if(t MATCHES "-empty$") # empty isn't supposed to parse