diff options
author | Brad King <brad.king@kitware.com> | 2009-07-28 12:36:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-28 12:36:11 (GMT) |
commit | 836447663e6f109907fe381664a8b2d05c2c934f (patch) | |
tree | 1b18c95dc6851d908e52be7626c4872521cb9e15 /Modules/CMakeParseImplicitLinkInfo.cmake | |
parent | 855d07f80eb8c83100fcb8878623fcb917acab33 (diff) | |
download | CMake-836447663e6f109907fe381664a8b2d05c2c934f.zip CMake-836447663e6f109907fe381664a8b2d05c2c934f.tar.gz CMake-836447663e6f109907fe381664a8b2d05c2c934f.tar.bz2 |
BUG: Parse implicit link editor -z*extract options
The Sun Fortran compiler passes -zallextract and -zdefaultextract to the
linker so that all objects from one of its archives are included in the
link. This teaches the implicit options parser to recognize the flags.
We need to pass them explicitly on C++ link lines when Fortran code is
linked.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index b56781f..6ea3d58 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -25,7 +25,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var) list(GET args 0 cmd) endif() if("${cmd}" MATCHES "${linker_regex}") - string(REGEX REPLACE ";-([LY]);" ";-\\1" args "${args}") + string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}") foreach(arg IN LISTS args) if("${arg}" MATCHES "^-L(.:)?[/\\]") # Unix search path. @@ -46,6 +46,9 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var) elseif("${arg}" MATCHES "^-l:") # HP named library. list(APPEND implicit_libs ${arg}) + elseif("${arg}" MATCHES "^-z(all|default|weak)extract") + # Link editor option. + list(APPEND implicit_libs ${arg}) endif() endforeach() break() |