summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-12 14:18:33 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-03 22:07:52 (GMT)
commit93246685177fc3d64a6b5dc01904a4437e6c2a9e (patch)
treedccd40785871497aa4f35bb2583851180745cf5c /Modules
parent37bc1488703e22d40dea28706ed8a9e3574a1d77 (diff)
downloadCMake-93246685177fc3d64a6b5dc01904a4437e6c2a9e.zip
CMake-93246685177fc3d64a6b5dc01904a4437e6c2a9e.tar.gz
CMake-93246685177fc3d64a6b5dc01904a4437e6c2a9e.tar.bz2
LinkerId: Fix detection of GNU linker id without parenthesis in version output
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Internal/CMakeDetermineLinkerId.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Internal/CMakeDetermineLinkerId.cmake b/Modules/Internal/CMakeDetermineLinkerId.cmake
index 05c83d2..b66053f 100644
--- a/Modules/Internal/CMakeDetermineLinkerId.cmake
+++ b/Modules/Internal/CMakeDetermineLinkerId.cmake
@@ -58,10 +58,10 @@ function(cmake_determine_linker_id lang linker)
set(linker_frontend "MSVC")
endif()
break()
- elseif(linker_desc MATCHES "GNU ld \\([^)]+\\) ([0-9.]+)")
+ elseif(linker_desc MATCHES "GNU ld (\\([^)]+\\)|version) ([0-9.]+)")
set(linker_id "GNU")
set(linker_frontend "GNU")
- set(linker_version "${CMAKE_MATCH_1}")
+ set(linker_version "${CMAKE_MATCH_2}")
break()
elseif(linker_desc MATCHES "GNU gold \\([^)]+\\) ([0-9.]+)")
set(linker_id "GNUgold")