re2 pic support (#26513)
This commit is contained in:
parent
da31c7e894
commit
28529f9eaf
2 changed files with 8 additions and 3 deletions
|
@ -51,8 +51,7 @@ class Grpc(CMakePackage):
|
|||
depends_on('zlib')
|
||||
depends_on('c-ares')
|
||||
depends_on('abseil-cpp', when='@1.27:')
|
||||
depends_on('re2+shared', when='@1.33.1:+shared')
|
||||
depends_on('re2', when='@1.33.1:')
|
||||
depends_on('re2+pic', when='@1.33.1:')
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
|
|
|
@ -19,9 +19,15 @@ class Re2(CMakePackage):
|
|||
|
||||
variant('shared', default=False,
|
||||
description='Build shared instead of static libraries')
|
||||
variant('pic', default=True,
|
||||
description='Enable position independent code')
|
||||
|
||||
# shared libs must have position-independent code
|
||||
conflicts('+shared ~pic')
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
|
||||
self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
|
||||
self.define_from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic')
|
||||
]
|
||||
return args
|
||||
|
|
Loading…
Reference in a new issue