From: Matthias Maier Date: Wed, 2 Feb 2022 14:18:15 +0000 (-0600) Subject: CMake: Unconditionally require MPI for HDF5 X-Git-Tag: v9.4.0-rc1~537^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13319%2Fhead;p=dealii.git CMake: Unconditionally require MPI for HDF5 --- diff --git a/cmake/configure/configure_hdf5.cmake b/cmake/configure/configure_hdf5.cmake index d04c6fc8ec..ad99686e01 100644 --- a/cmake/configure/configure_hdf5.cmake +++ b/cmake/configure/configure_hdf5.cmake @@ -17,8 +17,7 @@ # Configuration for the hdf5 library: # -SET(FEATURE_HDF5_AFTER MPI) - +SET(FEATURE_HDF5_DEPENDS MPI) MACRO(FEATURE_HDF5_FIND_EXTERNAL var) FIND_PACKAGE(HDF5) @@ -26,16 +25,13 @@ MACRO(FEATURE_HDF5_FIND_EXTERNAL var) IF(HDF5_FOUND) SET(${var} TRUE) - IF( (HDF5_IS_PARALLEL AND NOT DEAL_II_WITH_MPI) OR - (NOT HDF5_IS_PARALLEL AND DEAL_II_WITH_MPI) ) + IF(NOT HDF5_IS_PARALLEL) MESSAGE(STATUS "Insufficient hdf5 installation found: " - "hdf5 has to be configured with the same MPI configuration as deal.II." + "hdf5 has to be configured with MPI support." ) SET(HDF5_ADDITIONAL_ERROR_STRING "Insufficient hdf5 installation found!\n" - "hdf5 has to be configured with the same MPI configuration as deal.II, but found:\n" - " DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n" - " HDF5_WITH_MPI = ${HDF5_WITH_MPI}\n" + "hdf5 has to be configured with MPI support.\n" ) SET(${var} FALSE) ENDIF() diff --git a/cmake/modules/FindHDF5.cmake b/cmake/modules/FindHDF5.cmake index f92c4a15d4..76cfa8a786 100644 --- a/cmake/modules/FindHDF5.cmake +++ b/cmake/modules/FindHDF5.cmake @@ -33,10 +33,7 @@ IF(NOT "${HDF5_DIR}" STREQUAL "") SET(HDF5_ROOT "${HDF5_DIR}") ENDIF() -IF(DEAL_II_WITH_MPI) - SET(HDF5_PREFER_PARALLEL TRUE) -ENDIF() - +SET(HDF5_PREFER_PARALLEL TRUE) FIND_PACKAGE(HDF5) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)