diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-03-25 21:57:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-03-25 21:57:30 (GMT) |
commit | 9db0c02b969907ed1d647b05329ef73f8207c4fb (patch) | |
tree | d17605ffdc884bbeb10434e1471333158f284fc5 | |
parent | 425408b5a13bdb4bab369846cd9f9108b058cb82 (diff) | |
download | hdf5-9db0c02b969907ed1d647b05329ef73f8207c4fb.zip hdf5-9db0c02b969907ed1d647b05329ef73f8207c4fb.tar.gz hdf5-9db0c02b969907ed1d647b05329ef73f8207c4fb.tar.bz2 |
[svn-r24899] Add msmpi fortran libs to FindMPI
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | config/cmake/FindMPI.cmake | 8 | ||||
-rw-r--r-- | fortran/CMakeLists.txt | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ce3e9bb..538e1c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -651,7 +651,7 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_D set (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH}) option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF) if (HDF5_ENABLE_PARALLEL) - find_package (MPI) + INCLUDE (FindMPI) INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_PATH}) if (MPI_C_FOUND) set (H5_HAVE_PARALLEL 1) diff --git a/config/cmake/FindMPI.cmake b/config/cmake/FindMPI.cmake index 6d12276..1b67a30 100644 --- a/config/cmake/FindMPI.cmake +++ b/config/cmake/FindMPI.cmake @@ -427,18 +427,18 @@ function (interrogate_mpi_compiler lang try_libs) HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} PATH_SUFFIXES lib) if (MPI_LIBRARIES_WORK AND MPI_LIB) - set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB}) + list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) endif() endif() if (${lang} STREQUAL Fortran) set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) find_library(MPI_LIB - NAMES fmpi fmpich fmpich2 fmpich2g + NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH} - PATH_SUFFIXES lib) + PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}) if (MPI_LIBRARIES_WORK AND MPI_LIB) - set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB}) + list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) endif() endif() diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 4d8c9dd..3fe9e7d 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -2,7 +2,11 @@ cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) - FIND_PACKAGE (MPI) + INCLUDE (FindMPI) + set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES}) + if (MPI_Fortran_LINK_FLAGS) + set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") + endif (MPI_Fortran_LINK_FLAGS) endif (H5_HAVE_PARALLEL) #----------------------------------------------------------------------------- |