ParaView: ParaView needs to set the HDF5 API (#33617)

When building ParaView with a newer HDf5 than 1.10, it needs to select the 1.10 API using flags.
This commit is contained in:
kwryankrattiger 2022-10-31 21:58:02 -05:00 committed by GitHub
parent df6cdcf6c7
commit 6b86a8562f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -311,6 +311,15 @@ def flag_handler(self, name, flags):
if (name == "cflags" or name == "cxxflags") and self.spec.satisfies("%intel"): if (name == "cflags" or name == "cxxflags") and self.spec.satisfies("%intel"):
flags.append("-no-ipo") flags.append("-no-ipo")
return (None, None, flags) return (None, None, flags)
if name in ("cflags", "cxxflags"):
# Constrain the HDF5 API
if self.spec.satisfies("@:5.9 +hdf5"):
if self.spec["hdf5"].satisfies("@1.10:"):
flags.append("-DH5_USE_18_API")
elif self.spec.satisfies("@5.10: +hdf5"):
if self.spec["hdf5"].satisfies("@1.12:"):
flags.append("-DH5_USE_110_API")
return (flags, None, None) return (flags, None, None)
def setup_run_environment(self, env): def setup_run_environment(self, env):