diff options
author | Brad King <brad.king@kitware.com> | 2019-08-29 13:40:01 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-08-29 13:40:12 (GMT) |
commit | ee945a590b14601b912ec15a8247f6b6ec338dd5 (patch) | |
tree | fbb3423a4fabbf75c1faced10f3ca3d4d300b5e3 /Modules | |
parent | fa36e2151d25358c7946a53c4440f0487210770d (diff) | |
parent | b5f20da94dacf1502a2de1b33cbed69163b3e143 (diff) | |
download | CMake-ee945a590b14601b912ec15a8247f6b6ec338dd5.zip CMake-ee945a590b14601b912ec15a8247f6b6ec338dd5.tar.gz CMake-ee945a590b14601b912ec15a8247f6b6ec338dd5.tar.bz2 |
Merge topic 'CMakeParseImplicitLinkInfo-comma-separated'
b5f20da94d CMakeParseImplicitLinkInfo supports comma separated link lines
2200bc068b Introduce a ParseImplicitLinkInfo test
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3730
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 30659eb..0465515 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -47,6 +47,18 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj endif() separate_arguments(args NATIVE_COMMAND "${line}") list(GET args 0 cmd) + else() + #check to see if the link line is comma-separated instead of space separated + string(REGEX REPLACE "," " " line "${line}") + if("${line}" MATCHES "${linker_regex}" AND + NOT "${line}" MATCHES "${linker_exclude_regex}") + separate_arguments(args NATIVE_COMMAND "${line}") + list(GET args 0 cmd) + if("${cmd}" MATCHES "exec:") + # ibm xl sometimes has 'exec: ' in-front of the linker + list(GET args 1 cmd) + endif() + endif() endif() set(is_msvc 0) if("${cmd}" MATCHES "${linker_regex}") |