Skip to content
Snippets Groups Projects
Commit 3d3614e5 authored by Kelly (KT) Thompson's avatar Kelly (KT) Thompson Committed by Todd Gamblin
Browse files

Update to allow netlib-scalapack to build against netlib-lapack. (#1539)

parent c1284a90
No related branches found
No related tags found
No related merge requests found
...@@ -41,12 +41,14 @@ class NetlibScalapack(Package): ...@@ -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): ...@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment