mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
Smale changes from CMake repo
This commit is contained in:
parent
ed4fa57298
commit
64e1513f43
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user