silo: resolve hdf5 develop-X.Y branch versions (#39344)
This commit is contained in:
parent
12a475e648
commit
fea2171672
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user