Skip to content

Commit

Permalink
silo: resolve hdf5 develop-X.Y branch versions (spack#39344)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrtobin authored Oct 27, 2024
1 parent 12a475e commit fea2171
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions var/spack/repos/builtin/packages/silo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,14 @@ def flag_handler(self, name, flags):
# presented with an HDF5 API consistent with the HDF5 version.
# Use the latest even-numbered API version, i.e. v1.13.1 uses
# API v1.12
maj_ver = int(spec["hdf5"].version[0])
min_ver = int(spec["hdf5"].version[1])

# hdf5 support branches have a `develop` prefix
if "develop" in str(spec["hdf5"].version):
maj_ver = int(spec["hdf5"].version[1])
min_ver = int(spec["hdf5"].version[2])
else:
maj_ver = int(spec["hdf5"].version[0])
min_ver = int(spec["hdf5"].version[1])
min_apiver = int(min_ver / 2) * 2
flags.append("-DH5_USE_{0}{1}_API".format(maj_ver, min_apiver))

Expand Down

0 comments on commit fea2171

Please sign in to comment.