FindMPI: Reset MPI_INCLUDE_PATH_WORK before use

This commit is contained in:
Christian Pfeiffer
2017-02-01 18:45:13 +01:00
parent 7b4514fb33
commit 93f29be231

View File

@@ -322,6 +322,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})