summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2017-02-02 10:31:22 (GMT)
committerChristian Pfeiffer <cpfeiffer@live.de>2017-02-02 10:31:22 (GMT)
commita2a73935b22444b158ec5de2916deb02d9f7928b (patch)
tree2abc601db4325b8cf77101143130f014a9039c46 /Modules
parent93f29be2316f51f1d27fb543f92911be5b9cec9e (diff)
downloadCMake-a2a73935b22444b158ec5de2916deb02d9f7928b.zip
CMake-a2a73935b22444b158ec5de2916deb02d9f7928b.tar.gz
CMake-a2a73935b22444b158ec5de2916deb02d9f7928b.tar.bz2
FindMPI: Remove leading spaces from flags
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 9cc7cab..dd700e3 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -313,6 +313,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)
string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}")
else()
@@ -364,6 +365,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)
string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}")
else()