BLD: enforce C++11 std for boost + xl_r (#13829)
* BLD: enforce C++11 std for boost + xl_r * the spack `cxxstd` variant is not sufficient to enforce `-std=c++11` usage in boost compile lines when `xl_r` compiler spec is in use; while it would be nice if this were fixed in a boost config file somewhere, for now this patch allows boost to build on POWER9 with an %xl_r compiler spec if the user specifies i.e.,: `spack install boost@1.70.0+mpi cxxstd=11 %xl_r@16.1.1.5` * Update var/spack/repos/builtin/packages/boost/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
e974f48be0
commit
008fe37941
@ -367,6 +367,12 @@ def determine_b2_options(self, spec, options):
|
||||
cxxflags.append('-stdlib=libc++')
|
||||
options.extend(['toolset=clang',
|
||||
'linkflags="-stdlib=libc++"'])
|
||||
elif spec.satisfies('%xl') or spec.satisfies('%xl_r'):
|
||||
# see also: https://lists.boost.org/boost-users/2019/09/89953.php
|
||||
# the cxxstd setting via spack is not sufficient to drive the
|
||||
# change into boost compilation
|
||||
if spec.variants['cxxstd'].value == '11':
|
||||
cxxflags.append('-std=c++11')
|
||||
|
||||
if cxxflags:
|
||||
options.append('cxxflags="{0}"'.format(' '.join(cxxflags)))
|
||||
|
Loading…
Reference in New Issue
Block a user