[Cmake-commits] [cmake-commits] king committed CMakeParseImplicitLinkInfo.cmake 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 7 08:43:53 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv11553/Modules

Modified Files:
	CMakeParseImplicitLinkInfo.cmake 
Log Message:
More robust implicit link line detection regex

The regex used by CMAKE_PARSE_IMPLICIT_LINK_INFO to detect link lines
should not match lines that happen to have ".../ld.../..." in them.  A
linker name should match only as the last component of a path.

See issue #9666.


Index: CMakeParseImplicitLinkInfo.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeParseImplicitLinkInfo.cmake,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** CMakeParseImplicitLinkInfo.cmake	6 Oct 2009 20:31:43 -0000	1.6
--- CMakeParseImplicitLinkInfo.cmake	7 Oct 2009 12:43:51 -0000	1.7
***************
*** 27,31 ****
      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}")
--- 27,33 ----
      get_filename_component(linker ${CMAKE_LINKER} NAME)
    endif()
!   # Construct a regex to match linker lines.  It must match both the
!   # whole line and just the command (argv[0]).
!   set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)")
    set(log "${log}  link line regex: [${linker_regex}]\n")
    string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")



More information about the Cmake-commits mailing list