Browse Source

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.
Brad King 16 years ago
parent
commit
20e6ac320d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Modules/CMakeParseImplicitLinkInfo.cmake

+ 1 - 0
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)
     get_filename_component(linker ${CMAKE_LINKER} NAME)
   endif()
   endif()
   set(linker_regex "^( *|.*/)(${linker}|ld|collect2)")
   set(linker_regex "^( *|.*/)(${linker}|ld|collect2)")
+  set(log "${log}  link line regex: [${linker_regex}]\n")
   string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
   string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
   foreach(line IN LISTS output_lines)
   foreach(line IN LISTS output_lines)
     set(cmd)
     set(cmd)