From c4417b0927991130d1c701f844e7e2b3464a207e Mon Sep 17 00:00:00 2001 From: Dominic Meiser <dmeiser79@gmail.com> Date: Thu, 14 Apr 2016 11:01:43 -0600 Subject: [PATCH] FindMPI: Recognize /LIBPATH for specification of linker paths. The Intel MPI wrappers use this form of -L to specify library locations. --- Modules/FindMPI.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 0e406e0270..ef4a7a1466 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() -- GitLab