diff --git a/CMakeLists.txt b/CMakeLists.txt index 23a8b5f19b..271631d012 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -658,9 +658,15 @@ else() set(HDF5_USE_STATIC_LIBRARIES off) endif() -find_package(HDF5 1.10 COMPONENTS C) +find_package(HDF5 COMPONENTS C) # Note: minimum version check is done below to bypass find_package + # and HDF5 version compatibility subtleties if(HDF5_FOUND) + if(HDF5_VERSION) + if (HDF5_VERSION VERSION_LESS 1.10.0) + message(FATAL_ERROR "QMCPACK requires HDF5 version >= 1.10.0") + endif() + endif(HDF5_VERSION) if(HDF5_IS_PARALLEL) if(HAVE_MPI) message(STATUS "Parallel HDF5 library found")