Update to allow netlib-scalapack to build against netlib-lapack. (#1539)
This commit is contained in:
parent
c1284a9046
commit
3d3614e522
@ -41,12 +41,14 @@ class NetlibScalapack(Package):
|
|||||||
|
|
||||||
variant('shared', default=True,
|
variant('shared', default=True,
|
||||||
description='Build the shared library version')
|
description='Build the shared library version')
|
||||||
variant('fpic', default=False, description="Build with -fpic compiler option")
|
variant('fpic', default=False,
|
||||||
|
description="Build with -fpic compiler option")
|
||||||
|
|
||||||
provides('scalapack')
|
provides('scalapack')
|
||||||
|
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('lapack')
|
depends_on('lapack')
|
||||||
|
depends_on('blas')
|
||||||
depends_on('cmake', when='@2.0.0:', type='build')
|
depends_on('cmake', when='@2.0.0:', type='build')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
@ -54,18 +56,18 @@ def install(self, spec, prefix):
|
|||||||
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else
|
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else
|
||||||
'OFF'),
|
'OFF'),
|
||||||
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else
|
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else
|
||||||
'ON'),
|
'ON')
|
||||||
# forces scalapack to use find_package(LAPACK):
|
|
||||||
"-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Make sure we use Spack's Lapack:
|
# Make sure we use Spack's Lapack:
|
||||||
options.extend([
|
options.extend([
|
||||||
'-DLAPACK_FOUND=true',
|
'-DLAPACK_FOUND=true',
|
||||||
'-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include,
|
|
||||||
'-DLAPACK_LIBRARIES=%s' % (
|
'-DLAPACK_LIBRARIES=%s' % (
|
||||||
spec['lapack'].lapack_shared_lib if '+shared' in spec else
|
spec['lapack'].lapack_shared_lib if '+shared' in spec else
|
||||||
spec['lapack'].lapack_static_lib),
|
spec['lapack'].lapack_static_lib),
|
||||||
|
'-DBLAS_LIBRARIES=%s' % (
|
||||||
|
spec['blas'].blas_shared_lib if '+shared' in spec else
|
||||||
|
spec['blas'].blas_static_lib)
|
||||||
])
|
])
|
||||||
|
|
||||||
if '+fpic' in spec:
|
if '+fpic' in spec:
|
||||||
|
Loading…
Reference in New Issue
Block a user