diff options
author | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-18 15:54:26 -0600 |
---|---|---|
committer | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-19 20:45:35 -0600 |
commit | ed0b5e649dd6bc480e3faa6ffcca121eb9e264b8 (patch) | |
tree | 64fcd086f993b4c131f12ddf30aafe67130b9b52 /var | |
parent | d02d72e06d4e67745ff8a0866c758e64f74828a3 (diff) | |
download | spack-ed0b5e649dd6bc480e3faa6ffcca121eb9e264b8.tar.gz spack-ed0b5e649dd6bc480e3faa6ffcca121eb9e264b8.tar.bz2 spack-ed0b5e649dd6bc480e3faa6ffcca121eb9e264b8.tar.xz spack-ed0b5e649dd6bc480e3faa6ffcca121eb9e264b8.zip |
+ Provide fpic variant for netlib-lapack.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-lapack/package.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 741f4af421..78c5a053fe 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -20,13 +20,13 @@ class NetlibLapack(Package): version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') variant('shared', default=False, description="Build shared library version") + variant('fpic', default=False, description="Build with -fpic compiler option") # virtual dependency provides('lapack') # blas is a virtual dependency. depends_on('blas') - depends_on('cmake') # Doesn't always build correctly in parallel @@ -37,24 +37,23 @@ class NetlibLapack(Package): blas = self.spec['netlib-blas'] return [join_path(blas.prefix.lib, 'blas.a')] - @when('^atlas') def get_blas_libs(self): blas = self.spec['atlas'] return [join_path(blas.prefix.lib, l) for l in ('libf77blas.a', 'libatlas.a')] - def install(self, spec, prefix): blas_libs = ";".join(self.get_blas_libs()) cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] if '+shared' in spec: cmake_args.append('-DBUILD_SHARED_LIBS=ON') + if '+fpic' in spec: + cmake_args.append('-DCMAKE_POSITION_INDEPENDENT_CODE=ON') cmake_args += std_cmake_args cmake(*cmake_args) make() make("install") - |