• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright Vladimir Prus 2004.
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt
4# or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#| tag::doc[]
7
8[[bbv2.reference.tools.compiler.intel]]
9= Intel C++
10
11The `intel-*` modules support the Intel C++ command-line compiler.
12
13The module is initialized using the following syntax:
14
15----
16using intel : [version] : [c++-compile-command] : [compiler options] ;
17----
18
19This statement may be repeated several times, if you want to configure
20several versions of the compiler.
21
22If compiler command is not specified, then B2 will look in PATH
23for an executable `icpc` (on Linux), or `icl.exe` (on Windows).
24
25The following options can be provided, using
26_`<option-name>option-value syntax`_:
27
28`cflags`::
29Specifies additional compiler flags that will be used when compiling C
30sources.
31
32`cxxflags`::
33Specifies additional compiler flags that will be used when compiling C++
34sources.
35
36`compileflags`::
37Specifies additional compiler flags that will be used when compiling both C
38and C++ sources.
39
40`linkflags`::
41Specifies additional command line options that will be passed to the linker.
42
43`root`::
44For the Linux version, specifies the root directory of the compiler installation.
45This option is necessary only if it is not possible to detect this information
46from the compiler command -- for example if the specified compiler command is
47a user script. For the Windows version, specifies the directory where the
48`iclvars.bat` file for configuring the compiler exists. Specifying the `root`
49option without specifying the compiler command allows the end-user not to have
50to worry about whether he is compiling 32-bit or 64-bit code, as the toolset will
51automatically configure the compiler for the appropriate address model and compiler
52command using the `iclvars.bat` batch file.
53
54|# # end::doc[]
55
56# This is a generic 'intel' toolset. Depending on the current
57# system, it forwards either to 'intel-linux' or 'intel-win'
58# modules.
59
60import feature ;
61import os ;
62import toolset ;
63
64feature.extend toolset : intel ;
65feature.subfeature toolset intel : platform : : propagated link-incompatible ;
66
67rule init ( * : * )
68{
69    if [ os.name ] = LINUX
70    {
71        toolset.using intel-linux :
72          $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
73    }
74    else if [ os.name ] = MACOSX
75    {
76        toolset.using intel-darwin :
77          $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
78    }
79    else
80    {
81        toolset.using intel-win :
82          $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
83    }
84}
85