summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-29 20:07:19 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-29 20:07:19 (GMT)
commitedad475e26c0547b638f2f9c29623460ca27e564 (patch)
tree4e40a75462f3d71249483bd372dde88b8ba987c1
parent5b85a581a88a56aed7ed7e16637b9d349629bdcf (diff)
downloadCMake-edad475e26c0547b638f2f9c29623460ca27e564.zip
CMake-edad475e26c0547b638f2f9c29623460ca27e564.tar.gz
CMake-edad475e26c0547b638f2f9c29623460ca27e564.tar.bz2
Recognize linker commands without paths
This teaches the implicit link line parsing code to recognize link lines that do not have a full path to the linker executable. At least one version of the Intel compiler on Linux invokes the linker as just "ld" instead of "/usr/bin/ld".
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 6ea3d58..7504392 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -12,7 +12,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var)
if(CMAKE_LINKER)
get_filename_component(linker ${CMAKE_LINKER} NAME)
endif()
- set(linker_regex "/(${linker}|ld|collect2)")
+ set(linker_regex "^( *|.*/)(${linker}|ld|collect2)")
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
foreach(line IN LISTS output_lines)
set(cmd)