Skip to content
Snippets Groups Projects
Commit cd3086f7 authored by Kelly (KT) Thompson's avatar Kelly (KT) Thompson
Browse files

+ Since CBLAS is only provided in 3.6.0 or later, modify package.py to on...

+ Since CBLAS is only provided in 3.6.0 or later, modify package.py to on refer to CBLAS when the latest release is requested.
parent aef7065e
No related branches found
No related tags found
No related merge requests found
...@@ -34,15 +34,18 @@ class NetlibLapack(Package): ...@@ -34,15 +34,18 @@ class NetlibLapack(Package):
def patch(self): def patch(self):
# Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name.
filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', if self.spec.satisfies('@3.6.0:'):
'${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/',
'${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True)
def install_one(self, spec, prefix, shared): def install_one(self, spec, prefix, shared):
cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'),
'-DCBLAS=ON', # always build CBLAS
'-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'),
'-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')]
if spec.satisfies('@3.6.0:'):
cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS
if '+external-blas' in spec: if '+external-blas' in spec:
# TODO : the mechanism to specify the library should be more general, # TODO : the mechanism to specify the library should be more general,
# TODO : but this allows to have an hook to an external blas # TODO : but this allows to have an hook to an external blas
...@@ -80,6 +83,3 @@ def setup_dependent_package(self, module, dspec): ...@@ -80,6 +83,3 @@ def setup_dependent_package(self, module, dspec):
if '+shared' in self.spec: if '+shared' in self.spec:
self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix)
self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment