suitesparse: Added +fpic (for linking with shared libraries) (#1542)

This commit is contained in:
Elizabeth Fischer 2016-09-22 14:03:49 -04:00 committed by Todd Gamblin
parent 7ad6c35627
commit 64c3b11478

View file

@ -36,6 +36,7 @@ class SuiteSparse(Package):
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
variant('tbb', default=True, description='Build with Intel TBB')
variant('fpic', default=True, description='Build position independent code (required to link with shared libraries)')
depends_on('blas')
depends_on('lapack')
@ -63,6 +64,8 @@ def install(self, spec, prefix):
'CXX=c++',
'F77=f77',
])
if '+fpic' in spec:
make_args.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC'])
# use Spack's metis in CHOLMOD/Partition module,
# otherwise internal Metis will be compiled