Skip to content

Commit

Permalink
Merge pull request #299 from OpenChemistry/mac-hdf5-version
Browse files Browse the repository at this point in the history
Bump HDF5 build version on the Mac
  • Loading branch information
cjh1 authored Oct 27, 2023
2 parents 0bf1e6b + 514ef2b commit 7a848c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ pip install cibuildwheel
if [[ $RUNNER_OS == "Windows" ]]; then
git clone --recursive -b 3.3.9 --depth 1 https://gitlab.com/libeigen/eigen /c/eigen
elif [[ $RUNNER_OS == "macOS" ]]; then
brew install eigen [email protected] ninja
brew link [email protected]
brew install eigen hdf5 ninja
fi
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ else()
add_library(stem ${_src} ${_vtkm_src})
endif()

# Version 1.12 of HDF5 deprecates the get_info_by_name1(...) interface and
# the get_info_by_name maps to get_info_by_name3(...) which has a different
# signature. We pass these compability flags so that we can continue to
# use the older signature with newer version of HDF5.
if (stempy_ENABLE_HDF5 AND NOT ("${HDF5_VERSION}" VERSION_LESS 1.12.0))
target_compile_options(stem PRIVATE "-DH5Oget_info_by_name_vers=1")
target_compile_options(stem PRIVATE "-DH5O_info_t_vers=1")
target_compile_options(stem PRIVATE "-DH5Ovisit_vers=1")
endif()

set_property(TARGET stem PROPERTY POSITION_INDEPENDENT_CODE ON)

target_link_libraries(stem
Expand Down

0 comments on commit 7a848c5

Please sign in to comment.