Skip to content

Rewrite HDF5 detection logic to work with newer versions#1263

Open
LourensVeen wants to merge 1 commit into
amusecode:mainfrom
LourensVeen:issue_1202_hdf5_detection_broken
Open

Rewrite HDF5 detection logic to work with newer versions#1263
LourensVeen wants to merge 1 commit into
amusecode:mainfrom
LourensVeen:issue_1202_hdf5_detection_broken

Conversation

@LourensVeen
Copy link
Copy Markdown
Member

@LourensVeen LourensVeen commented May 13, 2026

This adds a brand new HDF5 detection macro that also works with CMake-based builds of HDF5 1.14 and later. Some of those have broken h5fc -show commands and/or Fortran .mod files in odd locations, which it works around too.

The approach taken here is a bit different from AX_LIB_HDF5, in that we first try to detect using environment variables and fall back to h5cc and friends only if that fails. This matches modern environment managers a bit better.

I've tested this on Linux, with conda and apt-installed versions of HDF5 as well as a bunch of different local 1.14.6 and 2.0.0 installs. It's not been tested with Homebrew or MacPorts yet. Perhaps @rieder is willing to give it a go? When #1260 is done we'll have build tests that cover that anyway.

Fixes #1202.

@LourensVeen LourensVeen self-assigned this May 13, 2026
@LourensVeen LourensVeen requested a review from a team as a code owner May 13, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

HDF5 detection broken?

1 participant