hdf5: make mpi support optional
This commit is contained in:
parent
3163d016db
commit
c5b7eba457
@ -15,19 +15,28 @@ class Hdf5(Package):
|
||||
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
|
||||
version('1.8.13', 'c03426e9e77d7766944654280b467289')
|
||||
|
||||
depends_on("mpi")
|
||||
variant('mpi', default=False, description='Enable MPI support')
|
||||
|
||||
depends_on("mpi", when='+mpi')
|
||||
depends_on("zlib")
|
||||
|
||||
# TODO: currently hard-coded to use OpenMPI
|
||||
def install(self, spec, prefix):
|
||||
extra_args = []
|
||||
if '+mpi' in spec:
|
||||
extra_args.extend([
|
||||
"--enable-parallel",
|
||||
"CC=%s" % spec['mpich'].prefix.bin + "/mpicc",
|
||||
"CXX=%s" % spec['mpich'].prefix.bin + "/mpic++",
|
||||
])
|
||||
|
||||
configure(
|
||||
"--prefix=%s" % prefix,
|
||||
"--with-zlib=%s" % spec['zlib'].prefix,
|
||||
"--enable-parallel",
|
||||
"--enable-shared",
|
||||
"CC=%s" % spec['mpi'].prefix.bin + "/mpicc",
|
||||
"CXX=%s" % spec['mpi'].prefix.bin + "/mpic++")
|
||||
"CXX=%s" % spec['mpi'].prefix.bin + "/mpic++",
|
||||
*extra_args)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
Loading…
Reference in New Issue
Block a user