petaca: add shared library variant (#28543)
This commit is contained in:
parent
3893b90cb9
commit
551c44f0fd
@ -35,6 +35,8 @@ class Petaca(CMakePackage):
|
|||||||
description='Type build type to build',
|
description='Type build type to build',
|
||||||
values=('Debug', 'Release'))
|
values=('Debug', 'Release'))
|
||||||
|
|
||||||
|
variant('shared', default=False, description='build shared libraries')
|
||||||
|
|
||||||
# copied from openmpi/package.py to ensure fortran support
|
# copied from openmpi/package.py to ensure fortran support
|
||||||
@run_before('cmake')
|
@run_before('cmake')
|
||||||
def die_without_fortran(self):
|
def die_without_fortran(self):
|
||||||
@ -45,5 +47,6 @@ def die_without_fortran(self):
|
|||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
return [
|
return [
|
||||||
self.define('ENABLE_TESTS', self.run_tests)
|
self.define('ENABLE_TESTS', self.run_tests),
|
||||||
|
self.define_from_variant("BUILD_SHARED_LIBS", "shared")
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user