Merge pull request #1621 from KineticTheory/boost-intel
Boost: fix recipe for Intel compilers.
This commit is contained in:
commit
848299ba38
@ -23,7 +23,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
import spack
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -114,7 +113,8 @@ class Boost(Package):
|
|||||||
description="Build single-threaded versions of libraries")
|
description="Build single-threaded versions of libraries")
|
||||||
variant('icu_support', default=False,
|
variant('icu_support', default=False,
|
||||||
description="Include ICU support (for regex/locale libraries)")
|
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('icu', when='+icu_support')
|
||||||
depends_on('python', when='+python')
|
depends_on('python', when='+python')
|
||||||
@ -138,11 +138,15 @@ def url_for_version(self, version):
|
|||||||
def determine_toolset(self, spec):
|
def determine_toolset(self, spec):
|
||||||
if spec.satisfies("platform=darwin"):
|
if spec.satisfies("platform=darwin"):
|
||||||
return 'darwin'
|
return 'darwin'
|
||||||
|
else:
|
||||||
|
platform = 'linux'
|
||||||
|
|
||||||
toolsets = {'g++': 'gcc',
|
toolsets = {'g++': 'gcc',
|
||||||
'icpc': 'intel',
|
'icpc': 'intel',
|
||||||
'clang++': 'clang'}
|
'clang++': 'clang'}
|
||||||
|
|
||||||
|
if spec.satisfies('@1.47:'):
|
||||||
|
toolsets['icpc'] += '-' + platform
|
||||||
for cc, toolset in toolsets.iteritems():
|
for cc, toolset in toolsets.iteritems():
|
||||||
if cc in self.compiler.cxx_names:
|
if cc in self.compiler.cxx_names:
|
||||||
return toolset
|
return toolset
|
||||||
@ -160,16 +164,13 @@ def determine_bootstrap_options(self, spec, withLibs, options):
|
|||||||
join_path(spec['python'].prefix.bin, 'python'))
|
join_path(spec['python'].prefix.bin, 'python'))
|
||||||
|
|
||||||
with open('user-config.jam', 'w') as f:
|
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:
|
if '+mpi' in spec:
|
||||||
f.write('using mpi : %s ;\n' %
|
f.write('using mpi : %s ;\n' %
|
||||||
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
|
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
|
||||||
if '+python' in spec:
|
if '+python' in spec:
|
||||||
f.write('using python : %s : %s ;\n' %
|
f.write('using python : %s : %s ;\n' %
|
||||||
(spec['python'].version,
|
(spec['python'].version.up_to(2),
|
||||||
join_path(spec['python'].prefix.bin, 'python')))
|
join_path(spec['python'].prefix.bin, 'python')))
|
||||||
|
|
||||||
def determine_b2_options(self, spec, options):
|
def determine_b2_options(self, spec, options):
|
||||||
@ -202,7 +203,6 @@ def determine_b2_options(self, spec, options):
|
|||||||
multithreaded} must be enabled""")
|
multithreaded} must be enabled""")
|
||||||
|
|
||||||
options.extend([
|
options.extend([
|
||||||
'toolset=%s' % self.determine_toolset(spec),
|
|
||||||
'link=%s' % ','.join(linkTypes),
|
'link=%s' % ','.join(linkTypes),
|
||||||
'--layout=tagged'])
|
'--layout=tagged'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user