diff options
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ad08f9..fb20b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -462,28 +462,25 @@ SET (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH}) OPTION (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF) IF (HDF5_ENABLE_PARALLEL) INCLUDE (FindMPI) - INCLUDE_DIRECTORIES (${MPI_INCLUDE_PATH}) - IF (MPI_FOUND) + INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_PATH}) + IF (MPI_C_FOUND) SET (H5_HAVE_PARALLEL 1) - # MPI checks, only do these if MPI_FOUND is true, otherwise they always fail + # MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail # and once set, they are cached as false and not regenerated - SET (CMAKE_REQUIRED_LIBRARIES "${MPI_LIBRARY};${MPI_EXTRA_LIBRARY}" ) + SET (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}" ) CHECK_FUNCTION_EXISTS (MPI_File_get_size H5_HAVE_MPI_GET_SIZE) # Used by Fortran + MPI - CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) - CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) - ENDIF (MPI_FOUND) + CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) + CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) + ENDIF (MPI_C_FOUND) ENDIF (HDF5_ENABLE_PARALLEL) # Parallel IO usage requires MPI to be Linked and Included IF (H5_HAVE_PARALLEL) - SET (LINK_LIBS ${LINK_LIBS} ${MPI_LIBRARY}) - IF (MPI_LINK_FLAGS) - SET (CMAKE_EXE_LINKER_FLAGS ${MPI_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}) - ENDIF (MPI_LINK_FLAGS) - IF (MPI_EXTRA_LIBRARY) - SET (LINK_LIBS ${LINK_LIBS} ${MPI_EXTRA_LIBRARY}) - ENDIF (MPI_EXTRA_LIBRARY) + SET (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES}) + IF (MPI_C_LINK_FLAGS) + SET (CMAKE_EXE_LINKER_FLAGS ${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}) + ENDIF (MPI_C_LINK_FLAGS) ENDIF (H5_HAVE_PARALLEL) #----------------------------------------------------------------------------- |