summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost
diff options
context:
space:
mode:
authorTiziano Müller <tiziano.mueller@chem.uzh.ch>2021-11-12 08:02:08 +0100
committerGitHub <noreply@github.com>2021-11-11 23:02:08 -0800
commit38592b9e4f974254c18ce82e8b7ccca65a07539e (patch)
treed9a115b87d78a8374c9b5ce8a877c99ab23da85c /var/spack/repos/builtin/packages/boost
parentf777cc079d36e91a0f3db4099e2ff002e9dc12bf (diff)
downloadspack-38592b9e4f974254c18ce82e8b7ccca65a07539e.tar.gz
spack-38592b9e4f974254c18ce82e8b7ccca65a07539e.tar.bz2
spack-38592b9e4f974254c18ce82e8b7ccca65a07539e.tar.xz
spack-38592b9e4f974254c18ce82e8b7ccca65a07539e.zip
boost: ensure Spack wrappers are used for %intel (#27348)
Fixes #26117
Diffstat (limited to 'var/spack/repos/builtin/packages/boost')
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 360d72c585..a330338f3f 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -333,6 +333,7 @@ class Boost(Package):
def determine_toolset(self, spec):
toolsets = {'g++': 'gcc',
'icpc': 'intel',
+ 'icpx': 'intel',
'clang++': 'clang',
'armclang++': 'clang',
'xlc++': 'xlcpp',
@@ -343,6 +344,8 @@ class Boost(Package):
if spec.satisfies('@1.47:'):
toolsets['icpc'] += '-linux'
+ toolsets['icpx'] += '-linux'
+
for cc, toolset in toolsets.items():
if cc in self.compiler.cxx_names:
return toolset
@@ -383,14 +386,8 @@ class Boost(Package):
with open('user-config.jam', 'w') as f:
# Boost may end up using gcc even though clang+gfortran is set in
# compilers.yaml. Make sure this does not happen:
- if not spec.satisfies('%intel'):
- # using intel-linux : : spack_cxx in user-config.jam leads to
- # error: at project-config.jam:12
- # error: duplicate initialization of intel-linux with the following parameters: # noqa
- # error: version = <unspecified>
- # error: previous initialization at ./user-config.jam:1
- f.write("using {0} : : {1} ;\n".format(boost_toolset_id,
- spack_cxx))
+ f.write("using {0} : : {1} ;\n".format(boost_toolset_id,
+ spack_cxx))
if '+mpi' in spec:
# Use the correct mpi compiler. If the compiler options are
@@ -572,6 +569,11 @@ class Boost(Package):
bootstrap(*bootstrap_options)
+ # strip the toolchain to avoid double include errors (intel) or
+ # user-config being overwritten (again intel, but different boost version)
+ filter_file(r'^\s*using {0}.*'.format(self.determine_toolset(spec)), '',
+ os.path.join(self.stage.source_path, 'project-config.jam'))
+
# b2 used to be called bjam, before 1.47 (sigh)
b2name = './b2' if spec.satisfies('@1.47:') else './bjam'