netlib-xblas 1.0.248: new package (#7024)
* netlib-xblas@1.0.248: new package * netlib-lapack: add xblas option
This commit is contained in:

committed by
Massimiliano Culpo

parent
a62e1a0451
commit
b5daa51c06
@@ -55,6 +55,8 @@ class NetlibLapack(Package):
|
||||
|
||||
variant('lapacke', default=True,
|
||||
description='Activates the build of the LAPACKE C interface')
|
||||
variant('xblas', default=False,
|
||||
description='Builds extended precision routines using XBLAS')
|
||||
|
||||
patch('ibm-xl.patch', when='@3:6%xl')
|
||||
patch('ibm-xl.patch', when='@3:6%xl_r')
|
||||
@@ -65,6 +67,7 @@ class NetlibLapack(Package):
|
||||
|
||||
depends_on('cmake', type='build')
|
||||
depends_on('blas', when='+external-blas')
|
||||
depends_on('netlib-xblas+fortran+plain_blas', when='+xblas')
|
||||
|
||||
def patch(self):
|
||||
# Fix cblas CMakeLists.txt -- has wrong case for subdirectory name.
|
||||
@@ -155,6 +158,13 @@ def install_one(self, spec, prefix, shared):
|
||||
'-DBLAS_LIBRARIES:PATH=%s' % spec['blas'].libs.joined(';')
|
||||
])
|
||||
|
||||
if spec.satisfies('+xblas'):
|
||||
xblas_include_dir = spec['netlib-xblas'].prefix.include
|
||||
xblas_library = spec['netlib-xblas'].libs.joined(';')
|
||||
cmake_args.extend([
|
||||
'-DXBLAS_INCLUDE_DIR={0}'.format(xblas_include_dir),
|
||||
'-DXBLAS_LIBRARY={0}'.format(xblas_library)])
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
|
||||
build_dir = 'spack-build' + ('-shared' if shared else '-static')
|
||||
|
Reference in New Issue
Block a user