FindMPI: Recognize /LIBPATH for specification of linker paths.

The Intel MPI wrappers use this form of -L to specify library locations.
This commit is contained in:
Dominic Meiser 2016-04-14 11:01:43 -06:00 committed by Brad King
parent 52dddefcbb
commit c4417b0927
1 changed files with 2 additions and 2 deletions

View File

@ -357,10 +357,10 @@ function (interrogate_mpi_compiler lang try_libs)
endif() endif()
# Extract linker paths from the link command line # 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) set(MPI_LINK_PATH)
foreach(LPATH ${MPI_ALL_LINK_PATHS}) 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}) string(REPLACE "//" "/" LPATH ${LPATH})
list(APPEND MPI_LINK_PATH ${LPATH}) list(APPEND MPI_LINK_PATH ${LPATH})
endforeach() endforeach()