[Cmake-commits] CMake branch, next, updated. v2.8.3-796-g3a84289

Brad King brad.king at kitware.com
Fri Dec 10 07:58:36 EST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  3a8428979e93b052c50dcbeda4c9e88f7c6ac6be (commit)
       via  09d1c1080def2b060397469240f184b3fa5358d9 (commit)
       via  af2ad90991faea2be0dfe62e456794f46758c92a (commit)
       via  24cc3d48174ef7b120491520ceb9f81389dd6b3e (commit)
       via  83892c4a1170bf68a1e5da305899a23eb69a7500 (commit)
       via  fe3f878f15c498dcd9583bfd17b1ee11cbc5249d (commit)
      from  b25d5af1a5edf5b2bd39381bccf7dfef2fbefc59 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a8428979e93b052c50dcbeda4c9e88f7c6ac6be
commit 3a8428979e93b052c50dcbeda4c9e88f7c6ac6be
Merge: b25d5af 09d1c10
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 10 07:58:33 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 10 07:58:33 2010 -0500

    Merge topic 'NAG-Fortran' into next
    
    09d1c10 FortranCInterface: Recognize NAG Fortran module symbols
    af2ad90 Add NAG Fortran compiler information files
    24cc3d4 Recognize the NAG Fortran compiler
    83892c4 Allow Fortran platform files to set empty values
    fe3f878 Detect object files in implicit link information

diff --cc Modules/CMakeDetermineCompilerABI.cmake
index 81ec71c,ed0b6fb..7f918e6
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@@ -75,10 -61,11 +75,11 @@@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI l
        IF(CMAKE_${lang}_VERBOSE_FLAG
            # Implicit link information cannot be used explicitly for
            # multiple OS X architectures, so we skip it.
 -          AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
 +          AND NOT MULTI_ARCH
            # Skip this with Xcode for now.
            AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
-         CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)
+         CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+           "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
          FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
            "Parsed ${lang} implicit link information from above output:\n${log}\n\n")
        ENDIF()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09d1c1080def2b060397469240f184b3fa5358d9
commit 09d1c1080def2b060397469240f184b3fa5358d9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 17:15:48 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 18:12:42 2010 -0500

    FortranCInterface: Recognize NAG Fortran module symbols

diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index 18014af..4bcaae9 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -45,10 +45,12 @@ set(module_symbols
   my_module_mp_my_sub_    # Intel
   MY_MODULE_mp_MY_SUB     # Intel on Windows
   my_module_my_sub_       # PGI
+  my_module_MP_my_sub     # NAG
   mymodule$mysub          # HP
   mymodule_mp_mysub_      # Intel
   MYMODULE_mp_MYSUB       # Intel on Windows
   mymodule_mysub_         # PGI
+  mymodule_MP_mysub       # NAG
   ${FortranCInterface_MODULE_SYMBOLS}
   )
 list(REMOVE_DUPLICATES module_symbols)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af2ad90991faea2be0dfe62e456794f46758c92a
commit af2ad90991faea2be0dfe62e456794f46758c92a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 17:12:19 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 18:12:34 2010 -0500

    Add NAG Fortran compiler information files
    
    On Linux the NAG Fortran compiler uses gcc under the hood to link.  Use
    "-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link
    output.  Detect the NAG Fortran directory (using -dryrun) and then honor
    object files in the directory referenced in the implicit link line.
    Pass real linker options with "-Wl,-Xlinker,".  The -Wl, gets through
    the NAG front-end and the -Xlinker gets through the gcc front-end.

diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake
new file mode 100644
index 0000000..b68c479
--- /dev/null
+++ b/Modules/Compiler/NAG-Fortran.cmake
@@ -0,0 +1,32 @@
+# Help CMAKE_PARSE_IMPLICIT_LINK_INFO detect NAG Fortran object files.
+if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED)
+  message(STATUS "Detecting NAG Fortran directory")
+  # Run with -dryrun to see sample "link" line.
+  execute_process(
+    COMMAND ${CMAKE_Fortran_COMPILER} dummy.o -dryrun
+    OUTPUT_VARIABLE _dryrun
+    ERROR_VARIABLE _dryrun
+    )
+  # Match an object file.
+  string(REGEX MATCH "/[^ ]*/[^ /][^ /]*\\.o" _nag_obj "${_dryrun}")
+  if(_nag_obj)
+    # Parse object directory and convert to a regex.
+    string(REGEX REPLACE "/[^/]*$" "" _nag_dir "${_nag_obj}")
+    string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _nag_regex "${_nag_dir}")
+    set(CMAKE_Fortran_IMPLICIT_OBJECT_REGEX "^${_nag_regex}/")
+    file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+      "Detecting NAG Fortran directory with -dryrun found\n"
+      "  object: ${_nag_obj}\n"
+      "  directory: ${_nag_dir}\n"
+      "  regex: ${CMAKE_Fortran_IMPLICIT_OBJECT_REGEX}\n"
+      "from output:\n${_dryrun}\n\n")
+    message(STATUS "Detecting NAG Fortran directory - ${_nag_dir}")
+  else()
+    file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      "Detecting NAG Fortran directory with -dryrun failed:\n${_dryrun}\n\n")
+    message(STATUS "Detecting NAG Fortran directory - failed")
+  endif()
+endif()
+
+set(CMAKE_Fortran_MODDIR_FLAG "-mdir ")
+set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC")
diff --git a/Modules/Platform/Darwin-NAG-Fortran.cmake b/Modules/Platform/Darwin-NAG-Fortran.cmake
new file mode 100644
index 0000000..933f9e1
--- /dev/null
+++ b/Modules/Platform/Darwin-NAG-Fortran.cmake
@@ -0,0 +1,5 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
+
+# Need -fpp explicitly on case-insensitive filesystem.
+set(CMAKE_Fortran_COMPILE_OBJECT
+  "<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
diff --git a/Modules/Platform/Linux-NAG-Fortran.cmake b/Modules/Platform/Linux-NAG-Fortran.cmake
new file mode 100644
index 0000000..353bae6
--- /dev/null
+++ b/Modules/Platform/Linux-NAG-Fortran.cmake
@@ -0,0 +1,10 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
+
+# Need one "-Wl," level to send flag through to gcc.
+# Use "-Xlinker" to get through gcc to real linker.
+set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-Xlinker,-rpath,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG "-Wl,-Xlinker,-rpath-link,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-Xlinker,-soname,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-rdynamic")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24cc3d48174ef7b120491520ceb9f81389dd6b3e
commit 24cc3d48174ef7b120491520ceb9f81389dd6b3e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 17:11:18 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 17:51:47 2010 -0500

    Recognize the NAG Fortran compiler
    
    The Numerical Algorithms Group (NAG) Fortran compiler does not document
    a preprocessor macro to identify it.  Check for identifying output using
    the -V option.

diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 03ddd78..3801d7d 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -169,6 +169,9 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
   LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
   SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
   SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
+  LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS NAG) # Numerical Algorithms Group
+  SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V")
+  SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler")
 
   # Try to identify the compiler.
   SET(CMAKE_Fortran_COMPILER_ID)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83892c4a1170bf68a1e5da305899a23eb69a7500
commit 83892c4a1170bf68a1e5da305899a23eb69a7500
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 17:36:59 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 17:51:47 2010 -0500

    Allow Fortran platform files to set empty values
    
    Teach CMakeFortranInformation to use default flags only for variables
    that have not been set at all, rather then not set or empty.  This will
    allow platform or compiler-specific information files to set empty
    values without getting the defaults.

diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index f6a52c6..1e9b4e0 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -67,29 +67,29 @@ SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
 # Create a set of shared library variable specific to Fortran
 # For 90% of the systems, these are the same flags as the C versions
 # so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
   SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+ENDIF()
 
-IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
   SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+ENDIF()
 
 IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
   SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+ENDIF()
 
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
   SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) 
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+ENDIF()
 
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
   SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+ENDIF()
 
-IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
   SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
+ENDIF()
 
 IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
   SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
@@ -100,25 +100,25 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
 ENDIF()
 
 # repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
   SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+ENDIF()
 
-IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS)
   SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+ENDIF()
 
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
   SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
+ENDIF()
 
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
   SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
+ENDIF()
 
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
   SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
+ENDIF()
 
 IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
   SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe3f878f15c498dcd9583bfd17b1ee11cbc5249d
commit fe3f878f15c498dcd9583bfd17b1ee11cbc5249d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 17:07:34 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 17:07:34 2010 -0500

    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.

diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index d6df305..ed0b6fb 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -64,7 +64,8 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
           AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
           # Skip this with Xcode for now.
           AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
-        CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)
+        CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+          "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
         FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
           "Parsed ${lang} implicit link information from above output:\n${log}\n\n")
       ENDIF()
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}")
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index 0ab2a67..3fb4652 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -77,6 +77,13 @@ set(linux64_pgf90_libs "pgf90;pgf90_rpm1;pgf902;pgf90rtl;pgftnrtl;nspgc;pgc;rt;p
 set(linux64_pgf90_dirs "/opt/compiler/pgi/linux86-64/8.0-3/lib;/usr/lib64;/usr/lib64/gcc/x86_64-suse-linux/4.1.2")
 list(APPEND platforms linux64_pgf90)
 
+# nagfor dummy.f -Wl,-v
+set(linux64_nagfor_text " /usr/libexec/gcc/x86_64-redhat-linux/4.4.5/collect2 --no-add-needed --eh-frame-hdr --build-id -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.4.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../.. /usr/local/NAG/lib/f90_init.o /usr/local/NAG/lib/quickfit.o dummy.o -rpath /usr/local/NAG/lib /usr/local/NAG/lib/libf53.so /usr/local/NAG/lib/libf53.a -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.4.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/crtn.o")
+set(linux64_nagfor_libs "/usr/local/NAG/lib/f90_init.o;/usr/local/NAG/lib/quickfit.o;/usr/local/NAG/lib/libf53.a;m;c")
+set(linux64_nagfor_dirs "/usr/lib/gcc/x86_64-redhat-linux/4.4.5;/usr/lib64;/lib64;/usr/lib")
+set(linux64_nagfor_obj_regex "^/usr/local/NAG/lib")
+list(APPEND platforms linux64_nagfor)
+
 # gcc dummy.c -v # in strange path
 set(linux64_test1_text "
 /this/might/match/as/a/linker/ld/but/it/is/not because the ld is not the last path component
@@ -380,7 +387,7 @@ list(APPEND platforms msys_g77)
 # Test parsing for all above examples.
 
 foreach(p IN LISTS platforms)
-  cmake_parse_implicit_link_info("${${p}_text}" libs dirs log)
+  cmake_parse_implicit_link_info("${${p}_text}" libs dirs log "${${p}_obj_regex}")
 
   foreach(v libs dirs)
     if(NOT "${${v}}" STREQUAL "${${p}_${v}}")

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeDetermineCompilerABI.cmake        |    3 +-
 Modules/CMakeDetermineFortranCompiler.cmake    |    3 ++
 Modules/CMakeFortranInformation.cmake          |   42 ++++++++++++------------
 Modules/CMakeParseImplicitLinkInfo.cmake       |    7 +++-
 Modules/Compiler/NAG-Fortran.cmake             |   32 ++++++++++++++++++
 Modules/FortranCInterface/CMakeLists.txt       |    2 +
 Modules/Platform/Darwin-NAG-Fortran.cmake      |    5 +++
 Modules/Platform/Linux-NAG-Fortran.cmake       |   10 ++++++
 Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in |    9 ++++-
 9 files changed, 89 insertions(+), 24 deletions(-)
 create mode 100644 Modules/Compiler/NAG-Fortran.cmake
 create mode 100644 Modules/Platform/Darwin-NAG-Fortran.cmake
 create mode 100644 Modules/Platform/Linux-NAG-Fortran.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list