Skip to content
Snippets Groups Projects
Commit 9edb31a5 authored by Andrey Prokopenko's avatar Andrey Prokopenko Committed by becker33
Browse files

hdf5: added 'pic' variant (#2373)

parent 089e5b59
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,8 @@ class Hdf5(AutotoolsPackage): ...@@ -63,6 +63,8 @@ class Hdf5(AutotoolsPackage):
variant('szip', default=False, description='Enable szip support') variant('szip', default=False, description='Enable szip support')
variant('threadsafe', default=False, variant('threadsafe', default=False,
description='Enable thread-safe capabilities') description='Enable thread-safe capabilities')
variant('pic', default=True,
description='Produce position-independent code (for shared libs)')
depends_on('mpi', when='+mpi') depends_on('mpi', when='+mpi')
depends_on('szip', when='+szip') depends_on('szip', when='+szip')
...@@ -121,6 +123,11 @@ def configure_args(self): ...@@ -121,6 +123,11 @@ def configure_args(self):
if spec.satisfies('@:1.8.16'): if spec.satisfies('@:1.8.16'):
extra_args.append('--enable-fortran2003') 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: if '+mpi' in spec:
# The HDF5 configure script warns if cxx and mpi are enabled # The HDF5 configure script warns if cxx and mpi are enabled
# together. There doesn't seem to be a real reason for this, except # together. There doesn't seem to be a real reason for this, except
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment