From 20e6ac320d0d4b5ea9766d26e6215cc326ae071a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 6 Oct 2009 16:31:43 -0400 Subject: [PATCH] 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. --- Modules/CMakeParseImplicitLinkInfo.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 9cab2de23..1251f8611 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)