diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/netlib-lapack/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-lapack/package.py | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 08c94a5c9b..874473ba9c 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -36,6 +36,7 @@ class NetlibLapack(Package): homepage = "http://www.netlib.org/lapack/" url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + version('3.6.1', '421b2cb72e15f237e144428f9c460ee0') version('3.6.0', 'f2f6c67134e851fe189bb3ca1fbb5101') version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') @@ -66,6 +67,20 @@ class NetlibLapack(Package): '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + @property + def blas_libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + ['libblas'], root=self.prefix, shared=shared, recurse=True + ) + + @property + def lapack_libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + ['liblapack'], root=self.prefix, shared=shared, recurse=True + ) + def install_one(self, spec, prefix, shared): cmake_args = [ '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), @@ -76,12 +91,9 @@ class NetlibLapack(Package): cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS if '+external-blas' in spec: - # TODO : mechanism to specify the library should be more general, - # TODO : but this allows to have an hook to an external blas cmake_args.extend([ '-DUSE_OPTIMIZED_BLAS:BOOL=ON', - '-DBLAS_LIBRARIES:PATH=%s' % join_path( - spec['blas'].prefix.lib, 'libblas.a') + '-DBLAS_LIBRARIES:PATH=%s' % spec['blas'].blas_libs.joined(';') ]) cmake_args.extend(std_cmake_args) @@ -99,18 +111,3 @@ class NetlibLapack(Package): # Build shared libraries if requested. if '+shared' in spec: self.install_one(spec, prefix, True) - - def setup_dependent_package(self, module, dspec): - # This is WIP for a prototype interface for virtual packages. - # We can update this as more builds start depending on BLAS/LAPACK. - libdir = find_library_path( - 'libblas.a', self.prefix.lib64, self.prefix.lib) - - self.spec.blas_static_lib = join_path(libdir, 'libblas.a') - self.spec.lapack_static_lib = join_path(libdir, 'liblapack.a') - - if '+shared' in self.spec: - self.spec.blas_shared_lib = join_path( - libdir, 'libblas.%s' % dso_suffix) - self.spec.lapack_shared_lib = join_path( - libdir, 'liblapack.%s' % dso_suffix) |