summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com>2022-10-31 21:58:02 -0500
committerGitHub <noreply@github.com>2022-10-31 20:58:02 -0600
commit6b86a8562f464ff100165ad8f7416a63341d0fe7 (patch)
tree47d30bcf61e374087ccd7686c50e0f58aa80c14b
parentdf6cdcf6c77f461128b88e320c1f316c5794692a (diff)
downloadspack-6b86a8562f464ff100165ad8f7416a63341d0fe7.tar.gz
spack-6b86a8562f464ff100165ad8f7416a63341d0fe7.tar.bz2
spack-6b86a8562f464ff100165ad8f7416a63341d0fe7.tar.xz
spack-6b86a8562f464ff100165ad8f7416a63341d0fe7.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 0ed725dc6a..8dd0049e05 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -311,6 +311,15 @@ class Paraview(CMakePackage, CudaPackage):
if (name == "cflags" or name == "cxxflags") and self.spec.satisfies("%intel"):
flags.append("-no-ipo")
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)
def setup_run_environment(self, env):