Skip to content
Snippets Groups Projects
Commit b1849f9c authored by Matthias Wolf's avatar Matthias Wolf Committed by Peter Scheibel
Browse files

parquet: add -fPIC option (#9367)

This adds a pic variant and also exports all compiler flags as CMake
arguments
parent 48c7ee37
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment