Skip to content
Snippets Groups Projects
Commit 28537ae7 authored by Adam J. Stewart's avatar Adam J. Stewart
Browse files

Workaround until variant forwarding works properly

parent 4d12c545
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ class Hdf5(Package):
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
variant('mpi', default=False, description='Enable MPI support')
variant('mpi', default=True, description='Enable MPI support')
variant('szip', default=False, description='Enable szip support')
variant('threadsafe', default=False,
description='Enable thread-safe capabilities')
......
......@@ -52,15 +52,16 @@ class Netcdf(Package):
depends_on("zlib")
depends_on('hdf5')
# Variant forwarding
depends_on('hdf5+mpi', when='+mpi')
depends_on('hdf5~mpi', when='~mpi')
# NetCDF 4.4.0 and prior have compatibility issues with HDF5 1.10 and later
# https://github.com/Unidata/netcdf-c/issues/250
depends_on('hdf5@:1.8', when='@:4.4.0')
def install(self, spec, prefix):
# Workaround until variant forwarding works properly
if '+mpi' in spec and spec.satisfies('^hdf5~mpi'):
raise RuntimeError('Invalid spec. Package netcdf requires '
'hdf5+mpi, but spec asked for hdf5~mpi.')
# Environment variables
CPPFLAGS = []
LDFLAGS = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment