From 2ddaabed257e04c292b8e6e3954fff675b35907e Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 24 Aug 2016 15:57:28 -0600 Subject: + Boost: fix recipe for intel compilers. This is the same patch provided by PR #550, but rebased against the current develop branch. It also passes the flake8 checks. --- var/spack/repos/builtin/packages/boost/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 690a05a150..0d4ccc7ea3 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import spack import sys import os @@ -114,7 +113,8 @@ class Boost(Package): description="Build single-threaded versions of libraries") variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)") - variant('graph', default=False, description="Build the Boost Graph library") + variant('graph', default=False, + description="Build the Boost Graph library") depends_on('icu', when='+icu_support') depends_on('python', when='+python') @@ -138,11 +138,15 @@ class Boost(Package): def determine_toolset(self, spec): if spec.satisfies("platform=darwin"): return 'darwin' + else: + platform = 'linux' toolsets = {'g++': 'gcc', 'icpc': 'intel', 'clang++': 'clang'} + if spec.satisfies('@1.47:'): + toolsets['icpc'] += '-' + platform for cc, toolset in toolsets.iteritems(): if cc in self.compiler.cxx_names: return toolset @@ -160,16 +164,13 @@ class Boost(Package): join_path(spec['python'].prefix.bin, 'python')) with open('user-config.jam', 'w') as f: - compiler_wrapper = join_path(spack.build_env_path, 'c++') - f.write("using {0} : : {1} ;\n".format(boostToolsetId, - compiler_wrapper)) if '+mpi' in spec: f.write('using mpi : %s ;\n' % join_path(spec['mpi'].prefix.bin, 'mpicxx')) if '+python' in spec: f.write('using python : %s : %s ;\n' % - (spec['python'].version, + (spec['python'].version.up_to(2), join_path(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): @@ -202,7 +203,6 @@ class Boost(Package): multithreaded} must be enabled""") options.extend([ - 'toolset=%s' % self.determine_toolset(spec), 'link=%s' % ','.join(linkTypes), '--layout=tagged']) -- cgit v1.2.3-60-g2f50