diff options
author | Brad King <brad.king@kitware.com> | 2015-09-11 17:50:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-11 17:50:34 (GMT) |
commit | 97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4 (patch) | |
tree | 89b04985f0afb812ab9039a3f44d4428a0ad4899 /Modules/CMakeParseImplicitLinkInfo.cmake | |
parent | 8e8824149fb6525f1a6da5f9c825a67765ce240b (diff) | |
download | CMake-97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4.zip CMake-97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4.tar.gz CMake-97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4.tar.bz2 |
CMakeParseImplicitLinkInfo: Do not match "VAR=..." as link line (#15737)
When compiling with
LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
the compiler output includes a line like
COLLECT_GCC_OPTIONS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ...
that our link line regex matches due to an argument ending in "-ld".
Since it is not really the link line no implicit link information is
dectected. Exclude "VAR=..." lines from consideration as link lines to
fix this.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 8abc465..59092bd 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -31,7 +31,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # 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(linker_exclude_regex "collect2 version ") + set(linker_exclude_regex "collect2 version |^[A-Za-z0-9_]+=") set(log "${log} link line regex: [${linker_regex}]\n") string(REGEX REPLACE "\r?\n" ";" output_lines "${text}") foreach(line IN LISTS output_lines) |