summaryrefslogtreecommitdiff
path: root/Modules/CMakeParseImplicitLinkInfo.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-06 16:31:43 -0400
committerBrad King <brad.king@kitware.com>2009-10-06 16:31:43 -0400
commit20e6ac320d0d4b5ea9766d26e6215cc326ae071a (patch)
tree9b067357f7aa20bf90d7131d07f407b488e52ff4 /Modules/CMakeParseImplicitLinkInfo.cmake
parentb9850a614e62e5efbfcb520286f87f60002c09d1 (diff)
downloadcmake-20e6ac320d0d4b5ea9766d26e6215cc326ae071a.tar.gz
Log implicit link line detection regex
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log the regex it uses to detect the linker invocation line. The regex is computed from the CMAKE_LINKER if it is found, so it might change. A strange value might match the wrong line and cause implicit link info extraction to fail. See issue #9666.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 9cab2de239..1251f86119 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -27,6 +27,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
get_filename_component(linker ${CMAKE_LINKER} NAME)
endif()
set(linker_regex "^( *|.*/)(${linker}|ld|collect2)")
+ set(log "${log} link line regex: [${linker_regex}]\n")
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
foreach(line IN LISTS output_lines)
set(cmd)