[Cmake-commits] CMake branch, next, updated. v2.8.1-1510-g38439ed

Brad King brad.king at kitware.com
Fri Jun 25 14:22:57 EDT 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  38439ed531d6ff19b15d8d3c63154af3062443ea (commit)
       via  d84cbd0f77e4a8de14e791fffb0c63dc2bd88302 (commit)
      from  e548a88579a021598bcf0fc703246d265e7cc605 (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=38439ed531d6ff19b15d8d3c63154af3062443ea
commit 38439ed531d6ff19b15d8d3c63154af3062443ea
Merge: e548a88 d84cbd0
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jun 25 14:22:56 2010 -0400

    Merge 'FindMPI-flag-parsing' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d84cbd0f77e4a8de14e791fffb0c63dc2bd88302
commit d84cbd0f77e4a8de14e791fffb0c63dc2bd88302
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jun 25 08:00:38 2010 -0400

    FindMPI: Parse mpicc flags more carefully (#9093)
    
    Extend the fix from commit 68c7d3e2 (FindMPI: Do not parse -l in middle
    of library name, 2010-06-24).  Parse -D, -I, -L, and -Wl only with
    preceding spaces or at the beginning of the string.

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 90e738b..9e2a3ad 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -188,7 +188,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
   # the cache, and we don't want to override those settings.
 elseif (MPI_COMPILE_CMDLINE)
   # Extract compile flags from the compile command line.
-  string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
+  string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
   set(MPI_COMPILE_FLAGS_WORK)
   foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
     if (MPI_COMPILE_FLAGS_WORK)
@@ -199,10 +199,10 @@ elseif (MPI_COMPILE_CMDLINE)
   endforeach(FLAG)
 
   # Extract include paths from compile command line
-  string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
+  string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
   set(MPI_INCLUDE_PATH_WORK)
   foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
-    string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
+    string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
     string(REGEX REPLACE "//" "/" IPATH ${IPATH})
     list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
   endforeach(IPATH)
@@ -230,10 +230,10 @@ elseif (MPI_COMPILE_CMDLINE)
   endif (NOT MPI_INCLUDE_PATH_WORK)
 
   # Extract linker paths from the link command line
-  string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+  string(REGEX MATCHALL "(^| )-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
   set(MPI_LINK_PATH)
   foreach(LPATH ${MPI_ALL_LINK_PATHS})
-    string(REGEX REPLACE "^-L" "" LPATH ${LPATH})
+    string(REGEX REPLACE "^ ?-L" "" LPATH ${LPATH})
     string(REGEX REPLACE "//" "/" LPATH ${LPATH})
     list(APPEND MPI_LINK_PATH ${LPATH})
   endforeach(LPATH)
@@ -251,7 +251,7 @@ elseif (MPI_COMPILE_CMDLINE)
   endif (NOT MPI_LINK_PATH)
 
   # Extract linker flags from the link command line
-  string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
+  string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
   set(MPI_LINK_FLAGS_WORK)
   foreach(FLAG ${MPI_ALL_LINK_FLAGS})
     if (MPI_LINK_FLAGS_WORK)

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

Summary of changes:
 Modules/FindMPI.cmake |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list