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