summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-23 22:32:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-23 22:32:06 (GMT)
commit64e1513f43824b7acfe565721c9b6d17c4feb544 (patch)
tree4153ccb3880e491830351f4379d934fef9d98ea9 /config/cmake_ext_mod
parented4fa57298e50f4817d5350598cbb0c04bcefdf6 (diff)
downloadhdf5-64e1513f43824b7acfe565721c9b6d17c4feb544.zip
hdf5-64e1513f43824b7acfe565721c9b6d17c4feb544.tar.gz
hdf5-64e1513f43824b7acfe565721c9b6d17c4feb544.tar.bz2
Smale changes from CMake repo
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/FindMPI.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake
index 5e8084c..c8bdb16 100644
--- a/config/cmake_ext_mod/FindMPI.cmake
+++ b/config/cmake_ext_mod/FindMPI.cmake
@@ -315,6 +315,7 @@ function (interrogate_mpi_compiler lang try_libs)
set(MPI_COMPILE_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
+ string(REGEX REPLACE "^ " "" FLAG ${FLAG})
if (MPI_COMPILE_FLAGS_WORK)
set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
else()
@@ -324,6 +325,8 @@ function (interrogate_mpi_compiler lang try_libs)
# Extract include paths from compile command line
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(REPLACE "//" "/" IPATH ${IPATH})
@@ -366,6 +369,7 @@ function (interrogate_mpi_compiler lang try_libs)
string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
set(MPI_LINK_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_LINK_FLAGS})
+ string(REGEX REPLACE "^ " "" FLAG ${FLAG})
if (MPI_LINK_FLAGS_WORK)
set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
else()