hdf5: added 'pic' variant (#2373)
This commit is contained in:
parent
089e5b5996
commit
9edb31a51c
@ -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 @@ def configure_args(self):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user