add static options for some libraries (#2876)
* add static options for some libraries * make requested changes: add comments and use configure_args
This commit is contained in:

committed by
Todd Gamblin

parent
7d3da2ebdc
commit
6e895c4ccc
@@ -40,7 +40,15 @@ class Zlib(AutotoolsPackage):
|
||||
|
||||
variant('pic', default=True,
|
||||
description='Produce position-independent code (for shared libs)')
|
||||
variant('shared', default=True,
|
||||
description='Enables the build of shared libraries.')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
if '+pic' in self.spec:
|
||||
spack_env.set('CFLAGS', self.compiler.pic_flag)
|
||||
|
||||
def configure_args(self):
|
||||
config_args = []
|
||||
if '+shared' not in self.spec:
|
||||
config_args.append('--static')
|
||||
return config_args
|
||||
|
Reference in New Issue
Block a user