summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorDominic Meiser <dmeiser79@gmail.com>2016-04-14 17:01:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-15 17:42:05 (GMT)
commitc4417b0927991130d1c701f844e7e2b3464a207e (patch)
treead421217d22f8a3f594a2da2f38f2df94d65cf2d /Modules/FindMPI.cmake
parent52dddefcbbd2a79826fe9cb5b5fe787c6cdfe2a8 (diff)
downloadCMake-c4417b0927991130d1c701f844e7e2b3464a207e.zip
CMake-c4417b0927991130d1c701f844e7e2b3464a207e.tar.gz
CMake-c4417b0927991130d1c701f844e7e2b3464a207e.tar.bz2
FindMPI: Recognize /LIBPATH for specification of linker paths.
The Intel MPI wrappers use this form of -L to specify library locations.
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 0e406e0..ef4a7a1 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -357,10 +357,10 @@ function (interrogate_mpi_compiler lang try_libs)
endif()
# Extract linker paths from the link command line
- string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
+ string(REGEX MATCHALL "(^| |-Wl,)(-L|/LIBPATH:)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
set(MPI_LINK_PATH)
foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+ string(REGEX REPLACE "^(| |-Wl,)(-L|/LIBPATH:)" "" LPATH ${LPATH})
string(REPLACE "//" "/" LPATH ${LPATH})
list(APPEND MPI_LINK_PATH ${LPATH})
endforeach()