summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-11-02 15:14:14 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-11-02 15:14:14 (GMT)
commitc1edb4ad89d228e5834a9ccca6ed3ae04b98cea4 (patch)
treea769fa2a30bbe04d30db8de4d8f0958e4f850e79 /CMakeLists.txt
parent031075bccece52c6523ac44d925b2653e6fd6bed (diff)
downloadhdf5-c1edb4ad89d228e5834a9ccca6ed3ae04b98cea4.zip
hdf5-c1edb4ad89d228e5834a9ccca6ed3ae04b98cea4.tar.gz
hdf5-c1edb4ad89d228e5834a9ccca6ed3ae04b98cea4.tar.bz2
HDFFV-10321 merge from develop
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23452cd..2ec2b2d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -623,16 +623,15 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_D
set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
- include (FindMPI)
- INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_PATH})
+ find_package(MPI REQUIRED)
if (MPI_C_FOUND)
set (H5_HAVE_PARALLEL 1)
# 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_C_LIBRARIES}" )
# Used by Fortran + MPI
- 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)
+ CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
+ CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
else ()
message (STATUS "Parallel libraries not found")
endif ()