diff options
author | Brad King <brad.king@kitware.com> | 2010-12-09 22:07:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-09 22:07:34 (GMT) |
commit | fe3f878f15c498dcd9583bfd17b1ee11cbc5249d (patch) | |
tree | 6c0433b875a74fddf0e2ce28035f1b175b123c6b /Modules/CMakeParseImplicitLinkInfo.cmake | |
parent | 63d21c1f8efeb2f2337221119c479d75bbb0b7c0 (diff) | |
download | CMake-fe3f878f15c498dcd9583bfd17b1ee11cbc5249d.zip CMake-fe3f878f15c498dcd9583bfd17b1ee11cbc5249d.tar.gz CMake-fe3f878f15c498dcd9583bfd17b1ee11cbc5249d.tar.bz2 |
Detect object files in implicit link information
The NAG Fortran compiler implicitly passes object files by full path to
the linker. Teach CMakeParseImplicitLinkInfo to parse object files that
match some tool-specific regular expression.
Diffstat (limited to 'Modules/CMakeParseImplicitLinkInfo.cmake')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index defdb47..5405bda 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -16,7 +16,7 @@ # This is used internally by CMake and should not be included by user # code. -function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var) +function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex) set(implicit_libs_tmp "") set(implicit_dirs_tmp) set(log "") @@ -59,6 +59,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var) # Unix library full path. list(APPEND implicit_libs_tmp ${arg}) set(log "${log} arg [${arg}] ==> lib [${arg}]\n") + elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.o$" + AND obj_regex AND "${arg}" MATCHES "${obj_regex}") + # Object file full path. + list(APPEND implicit_libs_tmp ${arg}) + set(log "${log} arg [${arg}] ==> obj [${arg}]\n") elseif("${arg}" MATCHES "^-Y(P,)?") # Sun search path. string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}") |