parquet: add -fPIC option (#9367)
This adds a pic variant and also exports all compiler flags as CMake arguments
This commit is contained in:
parent
48c7ee37c1
commit
b1849f9c8b
@ -21,6 +21,8 @@ class Parquet(CMakePackage):
|
||||
depends_on('pkgconfig', type='build')
|
||||
depends_on('thrift+pic')
|
||||
|
||||
variant('pic', default=True,
|
||||
description='Build position independent code')
|
||||
variant('build_type', default='Release',
|
||||
description='CMake build type',
|
||||
values=('Debug', 'FastDebug', 'Release'))
|
||||
@ -31,3 +33,9 @@ def cmake_args(self):
|
||||
args.append("-D{0}_HOME={1}".format(dep.upper(),
|
||||
self.spec[dep].prefix))
|
||||
return args
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
flags = list(flags)
|
||||
if '+pic' in self.spec and name in ('cflags', 'cxxflags'):
|
||||
flags.append(self.compiler.pic_flag)
|
||||
return (None, None, flags)
|
||||
|
Loading…
Reference in New Issue
Block a user