~ubuntu-branches/ubuntu/utopic/cmake/utopic

« back to all changes in this revision

Viewing changes to Modules/CMakeParseImplicitLinkInfo.cmake

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-10-10 12:54:39 UTC
  • mfrom: (1.14.7)
  • Revision ID: package-import@ubuntu.com-20131010125439-h0ahaj004on6oj92
Tags: 2.8.12-0ubuntu1
New upstream release LP: #1246701

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  set(linker "CMAKE_LINKER-NOTFOUND")
27
27
  if(CMAKE_LINKER)
28
28
    get_filename_component(linker ${CMAKE_LINKER} NAME)
 
29
    string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" linker "${linker}")
29
30
  endif()
30
31
  # Construct a regex to match linker lines.  It must match both the
31
32
  # whole line and just the command (argv[0]).
32
 
  set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)")
 
33
  set(linker_regex "^( *|.*[/\\])(${linker}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)")
33
34
  set(linker_exclude_regex "collect2 version ")
34
35
  set(log "${log}  link line regex: [${linker_regex}]\n")
35
36
  string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")