[Cmake-commits] CMake branch, next, updated. v3.5.1-968-g0c0092a

Brad King brad.king at kitware.com
Fri Apr 15 13:43:08 EDT 2016


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  0c0092a7a674dd0c760705fc81eacc4714394cc7 (commit)
       via  2a99fae1cc30938a50fd55afd50c13b5c881c737 (commit)
       via  c4417b0927991130d1c701f844e7e2b3464a207e (commit)
      from  28fa4d3e9a246387cd1fa6f971ca2db5e6f46255 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c0092a7a674dd0c760705fc81eacc4714394cc7
commit 0c0092a7a674dd0c760705fc81eacc4714394cc7
Merge: 28fa4d3 2a99fae
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 15 13:43:07 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 15 13:43:07 2016 -0400

    Merge topic 'FindMPI-intel-compiler' into next
    
    2a99fae1 FindMPI: Recognize `.lib` file names for specification of link libraries
    c4417b09 FindMPI: Recognize /LIBPATH for specification of linker paths.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a99fae1cc30938a50fd55afd50c13b5c881c737
commit 2a99fae1cc30938a50fd55afd50c13b5c881c737
Author:     Dominic Meiser <dmeiser79 at gmail.com>
AuthorDate: Thu Apr 14 11:03:21 2016 -0600
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 15 13:42:05 2016 -0400

    FindMPI: Recognize `.lib` file names for specification of link libraries
    
    The Intel MPI compiler wrappers link against static MPI libraries simply
    by listing the libraries (no `-l`).

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index ef4a7a1..fbc6795 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -385,6 +385,13 @@ function (interrogate_mpi_compiler lang try_libs)
         # Extract the set of libraries to link against from the link command
         # line
         string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
+        if(WIN32)
+          # The intel wrappers on windows link against static versions of the MPI libraries.
+          # The static libraries are simply listed on the command line without -l.
+          # For instance: " icl ... impi.lib "
+          string(REGEX MATCHALL "(^| )([^\" ]+)\\.lib" tmp "${MPI_LINK_CMDLINE}")
+          list(APPEND MPI_LIBNAMES ${tmp})
+        endif()
 
         # add the compiler implicit directories because some compilers
         # such as the intel compiler have libraries that show up
@@ -399,6 +406,10 @@ function (interrogate_mpi_compiler lang try_libs)
         # to link against in an MPI program
         foreach(LIB ${MPI_LIBNAMES})
           string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+          if(WIN32)
+            string(REGEX REPLACE "\\.lib$" "" LIB ${LIB})
+          endif()
+          string(STRIP ${LIB} LIB)
           # MPI_LIB is cached by find_library, but we don't want that.  Clear it first.
           set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
           find_library(MPI_LIB NAMES ${LIB} HINTS ${MPI_LINK_PATH})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4417b0927991130d1c701f844e7e2b3464a207e
commit c4417b0927991130d1c701f844e7e2b3464a207e
Author:     Dominic Meiser <dmeiser79 at gmail.com>
AuthorDate: Thu Apr 14 11:01:43 2016 -0600
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 15 13:42:05 2016 -0400

    FindMPI: Recognize /LIBPATH for specification of linker paths.
    
    The Intel MPI wrappers use this form of -L to specify library locations.

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 0e406e0..ef4a7a1 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -357,10 +357,10 @@ function (interrogate_mpi_compiler lang try_libs)
         endif()
 
         # Extract linker paths from the link command line
-        string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+        string(REGEX MATCHALL "(^| |-Wl,)(-L|/LIBPATH:)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
         set(MPI_LINK_PATH)
         foreach(LPATH ${MPI_ALL_LINK_PATHS})
-          string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+          string(REGEX REPLACE "^(| |-Wl,)(-L|/LIBPATH:)" "" LPATH ${LPATH})
           string(REPLACE "//" "/" LPATH ${LPATH})
           list(APPEND MPI_LINK_PATH ${LPATH})
         endforeach()

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

Summary of changes:
 Modules/FindMPI.cmake |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list