summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-03-20 19:05:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-03-20 19:05:30 (GMT)
commit0be0491ee4d7fd793cc3d4426aa94268d186a47a (patch)
treee3607159307e078738e4e82caadf3c16175ed541 /config
parent34bfba14d5cd30f8ce7c524bc6a729f6cc08cf1c (diff)
downloadhdf5-0be0491ee4d7fd793cc3d4426aa94268d186a47a.zip
hdf5-0be0491ee4d7fd793cc3d4426aa94268d186a47a.tar.gz
hdf5-0be0491ee4d7fd793cc3d4426aa94268d186a47a.tar.bz2
[svn-r24849] Update to synch with latest cmake
Diffstat (limited to 'config')
-rw-r--r--config/cmake/FindMPI.cmake21
1 files changed, 20 insertions, 1 deletions
diff --git a/config/cmake/FindMPI.cmake b/config/cmake/FindMPI.cmake
index b16c9c3..6d12276 100644
--- a/config/cmake/FindMPI.cmake
+++ b/config/cmake/FindMPI.cmake
@@ -86,7 +86,7 @@ include(GetPrerequisites)
#
# The compilers are detected in this order:
#
-# 1. Try to find the most generic availble MPI compiler, as this is usually set up by
+# 1. Try to find the most generic available MPI compiler, as this is usually set up by
# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's
# the right compiler.
#
@@ -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
@@ -573,6 +587,11 @@ foreach (lang C CXX Fortran)
try_regular_compiler(${lang} regular_compiler_worked)
endif()
+ set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY})
+ set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED})
+ set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION})
+ set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
+
if (regular_compiler_worked)
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
else()