Skip to content

Commit

Permalink
parquet: use -fPIC. (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
matz-e authored Sep 27, 2018
1 parent 3021f08 commit 8c9d304
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions var/spack/repos/builtin/packages/parquet/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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'))
Expand All @@ -50,3 +52,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 comments on commit 8c9d304

Please sign in to comment.