summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-03-21 17:27:22 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-03-21 17:27:22 (GMT)
commitf8a10245e311cc516973aca55778396bde76d438 (patch)
treea1a91d4c64242ee05abced334adb7782ec28269f /Modules
parent7e94e6b52550d333557a013232e0e8e5a3381047 (diff)
parent2f9ad7c6e6067b162d58d8a8628ba2c38106a6e9 (diff)
downloadCMake-f8a10245e311cc516973aca55778396bde76d438.zip
CMake-f8a10245e311cc516973aca55778396bde76d438.tar.gz
CMake-f8a10245e311cc516973aca55778396bde76d438.tar.bz2
Merge topic 'findmpi_look_in_implicit_dirs'
2f9ad7c Fix FindMPI for the intel compiler on linux by looking in implict directories.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 1be4ccf..ae50ca7 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -354,6 +354,20 @@ function (interrogate_mpi_compiler lang try_libs)
# Extract the set of libraries to link against from the link command
# line
string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
+ # add the compiler implicit directories because some compilers
+ # such as the intel compiler have libraries that show up
+ # in the showme list that can only be found in the implicit
+ # link directories of the compiler. Do this for C++ and C
+ # compilers if the implicit link directories are defined.
+ if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES)
+ set(MPI_LINK_PATH
+ "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}")
+ endif ()
+
+ if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES)
+ set(MPI_LINK_PATH
+ "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
+ endif ()
# Determine full path names for all of the libraries that one needs
# to link against in an MPI program