Skip to content

Commit

Permalink
Merge pull request #771 from ECP-copa/fixup_link_hdf5
Browse files Browse the repository at this point in the history
fixup: use hdf5 library if available
  • Loading branch information
streeve authored Sep 17, 2024
2 parents 142068e + 0aa9785 commit 6d526fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -89,8 +89,12 @@ if(Cabana_ENABLE_SILO)
endif()

if(Cabana_ENABLE_HDF5)
# FIXME: replace with HDF5::HDF5 when requiring newer CMake
target_link_libraries(Core INTERFACE ${HDF5_LIBRARIES})
# FIXME: remove when requiring newer CMake
if(CMAKE_VERSION VERSION_LESS 3.26)
target_link_libraries(Core INTERFACE ${HDF5_LIBRARIES})
else()
target_link_libraries(Core INTERFACE HDF5::HDF5)
endif()
endif()

if(Cabana_ENABLE_MPI)

0 comments on commit 6d526fd

Please sign in to comment.