Rewrite HDF5 detection logic to work with newer versions#1263
Open
LourensVeen wants to merge 1 commit into
Open
Rewrite HDF5 detection logic to work with newer versions#1263LourensVeen wants to merge 1 commit into
LourensVeen wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -showcommands 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
h5ccand 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.