Skip to content

Commit b2c3852

Browse files
committed
try disable HDF5 LTO to avoid link warnings
1 parent 979f045 commit b2c3852

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/hdf5.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ include(ExternalProject)
66
include(FetchContent)
77

88
if(NOT DEFINED hdf5_req)
9-
if(LINUX)
10-
set(hdf5_req 1.10)
11-
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
9+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
1210
set(hdf5_req 2.0)
1311
else()
1412
set(hdf5_req 1.14)
1513
endif()
14+
# HDF5 1.10 has runtime bugs
1615
endif()
1716

1817
if(hdf5_parallel)
@@ -84,6 +83,7 @@ set(hdf5_cmake_args
8483
-DCMAKE_BUILD_TYPE=Release
8584
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
8685
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
86+
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF
8787
-DHDF5_BUILD_HL_LIB:BOOL=true
8888
-DHDF5_BUILD_FORTRAN:BOOL=true
8989
-DHDF5_BUILD_CPP_LIB:BOOL=false

0 commit comments

Comments
 (0)