diff options
author | Brad King <brad.king@kitware.com> | 2023-12-13 15:36:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-03 21:24:58 (GMT) |
commit | dd480e5be58f4c0740c9331e7e1f099cd326ea8c (patch) | |
tree | 24f1c665cab4f355bf00d437b8d68eb6bdcc60d9 /Modules | |
parent | 262de2ad926429749077a9651fc6c6176cd2f19c (diff) | |
download | CMake-dd480e5be58f4c0740c9331e7e1f099cd326ea8c.zip CMake-dd480e5be58f4c0740c9331e7e1f099cd326ea8c.tar.gz CMake-dd480e5be58f4c0740c9331e7e1f099cd326ea8c.tar.bz2 |
LinkerId: Fix detection of linker tool for XL compilers
These compilers print an explicit `export XL_LINKER=` line.
Parse it separately.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index db39249..5234411 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -88,6 +88,8 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex) NOT linker_tool AND NOT "${line}" MATCHES "${linker_tool_exclude_regex}") if("${line}" MATCHES "exec: ([^()]*/(${linker}))") # IBM XL as nvcc host compiler set(linker_tool "${CMAKE_MATCH_1}") + elseif("${line}" MATCHES "^export XL_LINKER=(.*/${linker})[ \t]*$") # IBM XL + set(linker_tool "${CMAKE_MATCH_1}") elseif("${line}" MATCHES "${linker_tool_regex}") set(linker_tool "${CMAKE_MATCH_2}") endif() |