summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-29 14:59:52 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-29 14:59:52 (GMT)
commit96c7cb26e95e912e75614141eecb6472fc6e7948 (patch)
treeded49f7c071ebfa8f4be20030fb5f7fcdc380bbb /Modules/FindMPI.cmake
parent8460059a72312f142c43439a1eab5610c6d85dbe (diff)
downloadCMake-96c7cb26e95e912e75614141eecb6472fc6e7948.zip
CMake-96c7cb26e95e912e75614141eecb6472fc6e7948.tar.gz
CMake-96c7cb26e95e912e75614141eecb6472fc6e7948.tar.bz2
FindMPI: Fix parsing of mpicc -Wl,-L link flags (#9093)
Commit d84cbd0f (FindMPI: Parse mpicc flags more carefully, 2010-06-24) broke parsing of '-L' flags appearing after '-Wl,' by expecting a preceding space. Update the regular expression to allow '-Wl,-L' too.
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 6139d4d..250ae57 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -230,10 +230,10 @@ elseif (MPI_COMPILE_CMDLINE)
endif (NOT MPI_INCLUDE_PATH_WORK)
# Extract linker paths from the link command line
- string(REGEX MATCHALL "(^| )-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+ string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
set(MPI_LINK_PATH)
foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^ ?-L" "" LPATH ${LPATH})
+ string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
string(REGEX REPLACE "//" "/" LPATH ${LPATH})
list(APPEND MPI_LINK_PATH ${LPATH})
endforeach(LPATH)