|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2008-03-16 22:31:44
Author: dgregor
Date: 2008-03-16 22:31:44 EDT (Sun, 16 Mar 2008)
New Revision: 43664
URL: http://svn.boost.org/trac/boost/changeset/43664
Log:
Deal with multiple include paths in FindMPI module
Text files modified:
branches/CMake/release/tools/build/CMake/FindMPI.cmake | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Modified: branches/CMake/release/tools/build/CMake/FindMPI.cmake
==============================================================================
--- branches/CMake/release/tools/build/CMake/FindMPI.cmake (original)
+++ branches/CMake/release/tools/build/CMake/FindMPI.cmake 2008-03-16 22:31:44 EDT (Sun, 16 Mar 2008)
@@ -100,9 +100,14 @@
endforeach(FLAG)
# Extract include paths from compile command line
- string(REGEX MATCH "-I([^\" ]+|\"[^\"]+\")" MPI_INCLUDE_PATH ${MPI_COMPILE_CMDLINE})
- string(REGEX REPLACE "^-I" "" MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH})
- string(REGEX REPLACE "//" "/" MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH})
+ string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS ${MPI_COMPILE_CMDLINE})
+ set(MPI_INCLUDE_PATH)
+ foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
+ string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
+ string(REGEX REPLACE "//" "/" IPATH ${IPATH})
+ list(APPEND MPI_INCLUDE_PATH ${IPATH})
+ endforeach(IPATH)
+
# Extract linker paths from the link command line
string(REGEX MATCH "-L([^\" ]+|\"[^\"]+\")" MPI_LINK_PATH ${MPI_LINK_CMDLINE})
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk