summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wolf <m+git@sushinara.net>2018-10-18 22:12:56 +0200
committerPeter Scheibel <scheibel1@llnl.gov>2018-10-18 13:12:56 -0700
commitb1849f9c8be941f4016dd51f07786e19fdb7a979 (patch)
treef0b1881099f1452244b1447f6f497de9e30ae0ec
parent48c7ee37c17eb5a7f4fede3b687d7074e8685fb0 (diff)
downloadspack-b1849f9c8be941f4016dd51f07786e19fdb7a979.tar.gz
spack-b1849f9c8be941f4016dd51f07786e19fdb7a979.tar.bz2
spack-b1849f9c8be941f4016dd51f07786e19fdb7a979.tar.xz
spack-b1849f9c8be941f4016dd51f07786e19fdb7a979.zip
parquet: add -fPIC option (#9367)
This adds a pic variant and also exports all compiler flags as CMake arguments
-rw-r--r--var/spack/repos/builtin/packages/parquet/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/parquet/package.py b/var/spack/repos/builtin/packages/parquet/package.py
index cca8b8eab1..ce683895f6 100644
--- a/var/spack/repos/builtin/packages/parquet/package.py
+++ b/var/spack/repos/builtin/packages/parquet/package.py
@@ -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 @@ class Parquet(CMakePackage):
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)