diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 5b51187fea..17feb25fc3 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -122,6 +122,9 @@ class Boost(Package): description='Compile with clang libc++ instead of libstdc++') variant('numpy', default=False, description='Build the Boost NumPy library (requires +python)') + variant('pic', default=False, + description='Generate position-independent code (PIC), useful ' + 'for building static libraries') depends_on('icu4c', when='+icu') depends_on('python', when='+python') @@ -213,14 +216,12 @@ class Boost(Package): spack_cxx)) if '+mpi' in spec: - # Use the correct mpi compiler. If the compiler options are # empty or undefined, Boost will attempt to figure out the # correct options by running "${mpicxx} -show" or something # similar, but that doesn't work with the Cray compiler # wrappers. Since Boost doesn't use the MPI C++ bindings, # that can be used as a compiler option instead. - mpi_line = 'using mpi : %s' % spec['mpi'].mpicxx if 'platform=cray' in spec: @@ -313,6 +314,9 @@ class Boost(Package): if flag: cxxflags.append(flag) + if '+pic' in self.spec: + cxxflags.append(self.compiler.pic_flag) + # clang is not officially supported for pre-compiled headers # and at least in clang 3.9 still fails to build # http://www.boost.org/build/doc/html/bbv2/reference/precompiled_headers.html |