Skip to content

Commit

Permalink
Add cmake workaround for hdf5 version detection when using hdf5 with …
Browse files Browse the repository at this point in the history
…subversion (#26)

* [cmake] Work around issue of detecting hdf5 version for releases with subversion
  • Loading branch information
Wentzell authored Jul 29, 2024
1 parent 64c0632 commit 2d13f5b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions c++/h5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ find_package(HDF5 REQUIRED C HL)

# Link against interface target and export
target_link_libraries(h5_c PRIVATE hdf5::hdf5 hdf5::hdf5_hl)
if(HDF5_VERSION VERSION_GREATER 1.10)
target_compile_definitions(h5_c PRIVATE H5_USE_110_API)
endif()
if(HDF5_VERSION VERSION_GREATER_EQUAL 1.13)
target_compile_definitions(h5_c PRIVATE H5_USE_110_API)
if(HDF5_VERSION VERSION_GREATER_EQUAL 1.13 OR NOT HDF5_VERSION)
target_compile_definitions(h5_c PRIVATE H5_VER_GE_113)
endif()

Expand Down

0 comments on commit 2d13f5b

Please sign in to comment.