Skip to content

Commit cfe37fa

Browse files
committed
HDF5 build: default to 1.10 if linux, else 1.14
This fixes build issues on Windows while preserving stability for old HPC
1 parent 61e1d76 commit cfe37fa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ if(NOT DEFINED CRAY AND DEFINED ENV{PE_ENV})
1818
set(CRAY true)
1919
endif()
2020

21+
if(CMAKE_VERSION VERSION_LESS 3.25 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
22+
set(LINUX true)
23+
endif()
24+
2125
# --- avoid Anaconda libraries
2226
find_package(Python COMPONENTS Interpreter)
2327

cmake/hdf5.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ include(GNUInstallDirs)
55
include(ExternalProject)
66

77
if(NOT DEFINED hdf5_key)
8-
set(hdf5_key hdf5-1.10)
8+
if(LINUX)
9+
set(hdf5_key hdf5-1.10)
10+
else()
11+
set(hdf5_key hdf5-1.14)
12+
endif()
913
endif()
1014

1115
if(hdf5_parallel)

0 commit comments

Comments
 (0)