From a1e64c2b5bf420f8219e4cab6ed46947ced14d55 Mon Sep 17 00:00:00 2001 From: Paul Kent Date: Wed, 23 Aug 2023 21:51:20 -0400 Subject: [PATCH 1/2] Update HDF5 detection --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23a8b5f19b..29a0252979 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -658,9 +658,14 @@ else() set(HDF5_USE_STATIC_LIBRARIES off) endif() -find_package(HDF5 1.10 COMPONENTS C) +find_package(HDF5 COMPONENTS C) 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") From 53bee1aae202a556a13222c583a4b59db7170f83 Mon Sep 17 00:00:00 2001 From: "Paul R. C. Kent" Date: Thu, 24 Aug 2023 10:28:26 -0400 Subject: [PATCH 2/2] Add comment --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29a0252979..271631d012 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -658,7 +658,8 @@ else() set(HDF5_USE_STATIC_LIBRARIES off) endif() -find_package(HDF5 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)