+ 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.
This commit is contained in:
		@@ -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 @@ def url_for_version(self, version):
 | 
			
		||||
    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 @@ def determine_bootstrap_options(self, spec, withLibs, options):
 | 
			
		||||
                           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 @@ def determine_b2_options(self, spec, options):
 | 
			
		||||
                               multithreaded} must be enabled""")
 | 
			
		||||
 | 
			
		||||
        options.extend([
 | 
			
		||||
            'toolset=%s' % self.determine_toolset(spec),
 | 
			
		||||
            'link=%s' % ','.join(linkTypes),
 | 
			
		||||
            '--layout=tagged'])
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user