LAPACKC++: added "shared" variant (#16419)

We can control the shared/static build of CMake and the default in
Spack is to build shared libraries. The old, uncontrolled default
of this package is a static build.
This commit is contained in:
Axel Huebl 2020-05-04 00:39:20 -07:00 committed by GitHub
parent d5adad6953
commit 87f78137a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,8 +16,16 @@ class Lapackpp(CMakePackage):
version('develop', hg=hg, revision="7ffa486") version('develop', hg=hg, revision="7ffa486")
variant('shared', default=True,
description='Build a shared version of the library')
depends_on('blaspp') depends_on('blaspp')
def cmake_args(self): def cmake_args(self):
return ['-DBUILD_LAPACKPP_TESTS:BOOL={0}'.format( spec = self.spec
'ON' if self.run_tests else 'OFF')] return [
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
'ON' if '+shared' in spec else 'OFF'),
'-DBUILD_LAPACKPP_TESTS:BOOL={0}'.format(
'ON' if self.run_tests else 'OFF')
]