summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index a150a2f35b..ac3aa1ef2e 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -112,7 +112,10 @@ class Hdf5(CMakePackage):
depends_on("cmake@3.12:", type="build")
depends_on("cmake@3.18:", type="build", when="@1.13:")
- depends_on("mpi", when="+mpi")
+ with when("+mpi"):
+ depends_on("mpi")
+ depends_on("mpich+fortran", when="+fortran ^[virtuals=mpi] mpich")
+
depends_on("java", type=("build", "run"), when="+java")
depends_on("szip", when="+szip")
depends_on("zlib-api")