mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
FindMPI: Remove leading spaces from flags
This commit is contained in:
@@ -313,6 +313,7 @@ function (interrogate_mpi_compiler lang try_libs)
|
|||||||
set(MPI_COMPILE_FLAGS_WORK)
|
set(MPI_COMPILE_FLAGS_WORK)
|
||||||
|
|
||||||
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
|
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
|
||||||
|
string(REGEX REPLACE "^ " "" FLAG ${FLAG})
|
||||||
if (MPI_COMPILE_FLAGS_WORK)
|
if (MPI_COMPILE_FLAGS_WORK)
|
||||||
string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}")
|
string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}")
|
||||||
else()
|
else()
|
||||||
@@ -364,6 +365,7 @@ function (interrogate_mpi_compiler lang try_libs)
|
|||||||
string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
|
string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
|
||||||
set(MPI_LINK_FLAGS_WORK)
|
set(MPI_LINK_FLAGS_WORK)
|
||||||
foreach(FLAG ${MPI_ALL_LINK_FLAGS})
|
foreach(FLAG ${MPI_ALL_LINK_FLAGS})
|
||||||
|
string(REGEX REPLACE "^ " "" FLAG ${FLAG})
|
||||||
if (MPI_LINK_FLAGS_WORK)
|
if (MPI_LINK_FLAGS_WORK)
|
||||||
string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}")
|
string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}")
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user