diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-02-24 19:28:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-02-24 19:28:30 (GMT) |
commit | 1b8c195eb7b277c6b39061b6acac2583a7ee100a (patch) | |
tree | 9e2822eaf39d57ee230f2d45a8d144dfdbabe8db /config/cmake_ext_mod/FindMPI.cmake | |
parent | 8578cb8499213a83a218085a899c79c2cc071985 (diff) | |
parent | ca8aeefeba8d6285423b701c3a6a36a2ad42fbb5 (diff) | |
download | hdf5-1b8c195eb7b277c6b39061b6acac2583a7ee100a.zip hdf5-1b8c195eb7b277c6b39061b6acac2583a7ee100a.tar.gz hdf5-1b8c195eb7b277c6b39061b6acac2583a7ee100a.tar.bz2 |
Merge pull request #312 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ca8aeefeba8d6285423b701c3a6a36a2ad42fbb5':
MS keeps changing names
Update docs and scripts for release
Smale changes from CMake repo
Diffstat (limited to 'config/cmake_ext_mod/FindMPI.cmake')
-rw-r--r-- | config/cmake_ext_mod/FindMPI.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index 5e8084c..f562a64 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() @@ -464,7 +468,7 @@ function (interrogate_mpi_compiler lang try_libs) set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) find_path(MPI_HEADER_PATH mpifptr.h HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES include include/${MS_MPI_ARCH_DIR} include/${MS_MPI_ARCH_DIR2} Inc Inc/${MS_MPI_ARCH_DIR} Inc/${MS_MPI_ARCH_DIR2}) + PATH_SUFFIXES include Include include/${MS_MPI_ARCH_DIR} Include/${MS_MPI_ARCH_DIR2} Include/${MS_MPI_ARCH_DIR} include/${MS_MPI_ARCH_DIR2} Inc Inc/${MS_MPI_ARCH_DIR} Inc/${MS_MPI_ARCH_DIR2}) if (MPI_INCLUDE_PATH_WORK AND MPI_HEADER_PATH) list(APPEND MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) endif() |