summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-11-16 17:00:11 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2015-12-10 11:51:54 -0500
commitc5b7eba45743ebd131233c035101a0e64bb0c1c7 (patch)
tree6ce96e205dd2765347fd42835d50e2e55b1d817c
parent3163d016db3849c3c9e801c1cdb9e6e907afa313 (diff)
downloadspack-c5b7eba45743ebd131233c035101a0e64bb0c1c7.tar.gz
spack-c5b7eba45743ebd131233c035101a0e64bb0c1c7.tar.bz2
spack-c5b7eba45743ebd131233c035101a0e64bb0c1c7.tar.xz
spack-c5b7eba45743ebd131233c035101a0e64bb0c1c7.zip
hdf5: make mpi support optional
-rw-r--r--var/spack/packages/hdf5/package.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py
index 48997425cd..44d4ede278 100644
--- a/var/spack/packages/hdf5/package.py
+++ b/var/spack/packages/hdf5/package.py
@@ -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")