diff options
author | Andrey Prokopenko <aprokop@users.noreply.github.com> | 2016-12-05 14:57:04 -0500 |
---|---|---|
committer | becker33 <becker33@llnl.gov> | 2016-12-05 11:57:04 -0800 |
commit | 9edb31a51c81b68c55ab252be9c83f2354325fd0 (patch) | |
tree | ba0cab71d99f868e13174c3b8114d44b1250f86a /var | |
parent | 089e5b59961af832fcb1ecc5426d99a0e89b0642 (diff) | |
download | spack-9edb31a51c81b68c55ab252be9c83f2354325fd0.tar.gz spack-9edb31a51c81b68c55ab252be9c83f2354325fd0.tar.bz2 spack-9edb31a51c81b68c55ab252be9c83f2354325fd0.tar.xz spack-9edb31a51c81b68c55ab252be9c83f2354325fd0.zip |
hdf5: added 'pic' variant (#2373)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 9defe6ed5e..ef61b312fe 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -63,6 +63,8 @@ class Hdf5(AutotoolsPackage): variant('szip', default=False, description='Enable szip support') variant('threadsafe', default=False, description='Enable thread-safe capabilities') + variant('pic', default=True, + description='Produce position-independent code (for shared libs)') depends_on('mpi', when='+mpi') depends_on('szip', when='+szip') @@ -121,6 +123,11 @@ class Hdf5(AutotoolsPackage): if spec.satisfies('@:1.8.16'): extra_args.append('--enable-fortran2003') + if '+pic' in spec: + extra_args.append('CFLAGS={0}'.format(self.compiler.pic_flag)) + extra_args.append('CXXFLAGS={0}'.format(self.compiler.pic_flag)) + extra_args.append('FFLAGS={0}'.format(self.compiler.pic_flag)) + if '+mpi' in spec: # The HDF5 configure script warns if cxx and mpi are enabled # together. There doesn't seem to be a real reason for this, except |