boost-react-native-bundle
Version:
Boost library as in https://sourceforge.net/projects/boost/files/boost/1.57.0/
824 lines (815 loc) • 196 kB
HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Reference</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual">
<link rel="prev" href="tasks.html" title="Common tasks">
<link rel="next" href="extender.html" title="Extender Manual">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tasks.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="extender.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.reference"></a>Reference</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="reference.html#bbv2.reference.general">General information</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.rules">Builtin rules</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.overview.builtins.features">Builtin features</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools">Builtin tools</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.modules">Builtin modules</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.class">Builtin classes</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.buildprocess">Build process</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.definitions">Definitions</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.general"></a>General information</h3></div></div></div>
<div class="toc"><dl class="toc"><dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt></dl></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.init"></a>Initialization</h4></div></div></div>
<p>
Immediately upon starting, the Boost.Build engine (<span class="command"><strong>b2</strong></span>)
loads the Jam code that implements the build system. To do this, it searches for a file
called <code class="filename">boost-build.jam</code>, first in the invocation directory, then
in its parent and so forth up to the filesystem root, and finally
in the directories specified by the environment variable
BOOST_BUILD_PATH. When found, the file is interpreted, and should
specify the build system location by calling the boost-build
rule:</p>
<pre class="programlisting">
rule boost-build ( location ? )
</pre>
<p>
If location is a relative path, it is treated as relative to
the directory of <code class="filename">boost-build.jam</code>. The directory specified by
that location and the directories in BOOST_BUILD_PATH are then searched for
a file called <code class="filename">bootstrap.jam</code>, which is expected to
bootstrap the build system. This arrangement allows the build
system to work without any command-line or environment variable
settings. For example, if the build system files were located in a
directory "build-system/" at your project root, you might place a
<code class="filename">boost-build.jam</code> at the project root containing:
</p>
<pre class="programlisting">
boost-build build-system ;
</pre>
<p>
In this case, running <span class="command"><strong>b2</strong></span> anywhere in the project tree will
automatically find the build system.</p>
<p>The default <code class="filename">bootstrap.jam</code>, after loading some standard
definitions, loads two <code class="filename">site-config.jam</code> and <code class="filename">user-config.jam</code>.</p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.rules"></a>Builtin rules</h3></div></div></div>
<p>This section contains the list of all rules that
can be used in Jamfile—both rules that define new
targets and auxiliary rules.</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="literal">exe</code></span></dt>
<dd><p>Creates an executable file. See
<a class="xref" href="tasks.html#bbv2.tasks.programs" title="Programs">the section called “Programs”</a>.</p></dd>
<dt><span class="term"><code class="literal">lib</code></span></dt>
<dd><p>Creates an library file. See
<a class="xref" href="tasks.html#bbv2.tasks.libraries" title="Libraries">the section called “Libraries”</a>.</p></dd>
<dt><span class="term"><code class="literal">install</code></span></dt>
<dd><p>Installs built targets and other files. See
<a class="xref" href="tasks.html#bbv2.tasks.installing" title="Installing">the section called “Installing”</a>.</p></dd>
<dt><span class="term"><code class="literal">alias</code></span></dt>
<dd><p>Creates an alias for other targets. See
<a class="xref" href="tasks.html#bbv2.tasks.alias" title="Alias">the section called “Alias”</a>.</p></dd>
<dt><span class="term"><code class="literal">unit-test</code></span></dt>
<dd><p>Creates an executable that will be automatically run. See
<a class="xref" href="tasks.html#bbv2.builtins.testing" title="Testing">the section called “Testing”</a>.</p></dd>
<dt>
<span class="term"><code class="literal">compile</code>, </span><span class="term"><code class="literal">compile-fail</code>, </span><span class="term"><code class="literal">link</code>, </span><span class="term"><code class="literal">link-fail</code>, </span><span class="term"><code class="literal">run</code>, </span><span class="term"><code class="literal">run-fail</code></span>
</dt>
<dd><p>Specialized rules for testing. See
<a class="xref" href="tasks.html#bbv2.builtins.testing" title="Testing">the section called “Testing”</a>.</p></dd>
<dt>
<a name="bbv2.reference.check-target-builds"></a><span class="term"><code class="literal">check-target-builds</code></span>
</dt>
<dd>
<p>The <code class="literal">check-target-builds</code> allows you
to conditionally use different properties depending on whether some
metatarget builds, or not. This is similar to functionality of configure
script in autotools projects. The function signature is:
</p>
<pre class="programlisting">
rule check-target-builds ( target message ? : true-properties * : false-properties * )
</pre>
<p>This function can only be used when passing requirements or usage
requirements to a metatarget rule. For example, to make an application link
to a library if it's avavailable, one has use the following:</p>
<pre class="programlisting">
exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ;
</pre>
<p>For another example, the alias rule can be used to consolidate configuraiton
choices and make them available to other metatargets, like so:</p>
<pre class="programlisting">
alias foobar : : : : [ check-target-builds has_foo "System has foo" : <library>foo : <library>bar ] ;
</pre>
</dd>
<dt><span class="term"><code class="literal">obj</code></span></dt>
<dd><p>Creates an object file. Useful when a single source
file must be compiled with special properties.</p></dd>
<dt><span class="term"><code class="literal">preprocessed</code></span></dt>
<dd><p>Creates an preprocessed source file. The arguments follow the
<a class="link" href="overview.html#bbv2.main-target-rule-syntax">common syntax</a>.</p></dd>
<dt>
<a name="bbv2.reference.rules.glob"></a><span class="term"><code class="literal">glob</code></span>
</dt>
<dd>
<p>The <code class="computeroutput">glob</code> rule takes a list shell pattern
and returns the list of files in the project's source directory that
match the pattern. For example:
</p>
<pre class="programlisting">
lib tools : [ glob *.cpp ] ;
</pre>
<p>
It is possible to also pass a second argument—the list of
exclude patterns. The result will then include the list of
files patching any of include patterns, and not matching any
of the exclude patterns. For example:
</p>
<pre class="programlisting">
lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ;
</pre>
<p>
</p>
</dd>
<dt>
<a name="bbv2.reference.glob-tree"></a><span class="term"><code class="literal">glob-tree</code></span>
</dt>
<dd>
<p>The <code class="computeroutput">glob-tree</code> is similar to the
<code class="computeroutput">glob</code> except that it operates recursively from
the directory of the containing Jamfile. For example:
</p>
<pre class="programlisting">
ECHO [ glob-tree *.cpp : .svn ] ;
</pre>
<p>
will print the names of all C++ files in your project. The
<code class="literal">.svn</code> exclude pattern prevents the
<code class="computeroutput">glob-tree</code> rule from entering administrative
directories of the Subversion version control system.
</p>
</dd>
<dt><span class="term"><code class="literal">project</code></span></dt>
<dd><p>Declares project id and attributes, including
project requirements. See <a class="xref" href="overview.html#bbv2.overview.projects" title="Projects">the section called “Projects”</a>.
</p></dd>
<dt><span class="term"><code class="literal">use-project</code></span></dt>
<dd><p>Assigns a symbolic project ID to a project at
a given path. This rule must be better documented!
</p></dd>
<dt>
<a name="bbv2.reference.rules.explicit"></a><span class="term"><code class="literal">explicit</code></span>
</dt>
<dd><p>The <code class="literal">explicit</code> rule takes a single
parameter—a list of target names. The named targets will
be marked explicit, and will be built only if they are explicitly
requested on the command line, or if their dependents are built.
Compare this to ordinary targets, that are built implicitly when
their containing project is built.</p></dd>
<dt><span class="term"><code class="literal">always</code></span></dt>
<dd>
<p>The <code class="literal">always</code> funciton takes a single
parameter—a list of metatarget names. The top-level targets produced
by the named metatargets will be always considered out of date. Consider this example:
</p>
<pre class="programlisting">
exe hello : hello.cpp ;
exe bye : bye.cpp ;
always hello ;
</pre>
<p>If a build of <code class="filename">hello</code> is requested, then the binary will
always be relinked. The object files will not be recompiled, though. Note that if
a build of <code class="filename">hello</code> is not requested, for example you specify just
<code class="filename">bye</code> on the command line, <code class="filename">hello</code> will not
be relinked.</p>
</dd>
<dt><span class="term"><code class="literal">constant</code></span></dt>
<dd>
<p>Sets project-wide constant. Takes two
parameters: variable name and a value and makes the specified
variable name accessible in this Jamfile and any child Jamfiles.
For example:
</p>
<pre class="programlisting">
constant VERSION : 1.34.0 ;
</pre>
<p>
</p>
</dd>
<dt><span class="term"><code class="literal">path-constant</code></span></dt>
<dd>
<p>Same as <code class="literal">constant</code> except that
the value is treated as path relative to Jamfile location. For example,
if <span class="command"><strong>b2</strong></span> is invoked in the current directory,
and Jamfile in <code class="filename">helper</code> subdirectory has:
</p>
<pre class="programlisting">
path-constant DATA : data/a.txt ;
</pre>
<p>
then the variable <code class="varname">DATA</code> will be set to
<code class="literal">helper/data/a.txt</code>, and if <span class="command"><strong>b2</strong></span>
is invoked from the <code class="filename">helper</code> directory, then
the variable <code class="varname">DATA</code> will be set to
<code class="literal">data/a.txt</code>.
</p>
</dd>
<dt><span class="term"><code class="literal">build-project</code></span></dt>
<dd><p>Cause some other project to be built. This rule
takes a single parameter—a directory name relative to
the containing Jamfile. When the containing Jamfile is built,
the project located at that directory will be built as well.
At the moment, the parameter to this rule should be a directory
name. Project ID or general target references are not allowed.
</p></dd>
<dt><span class="term"><code class="literal">test-suite</code></span></dt>
<dd><p>This rule is deprecated and equivalent to
<code class="computeroutput">alias</code>.</p></dd>
</dl></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.overview.builtins.features"></a>Builtin features</h3></div></div></div>
<p>This section documents the features that are built-in into
Boost.Build. For features with a fixed set of values, that set is
provided, with the default value listed first.</p>
<a class="indexterm" name="idp548093776"></a><div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="literal">variant</code></span></dt>
<dd>
<p>
A feature combining several low-level features, making it easy to
request common build configurations.
</p>
<p>
<span class="bold"><strong>Allowed values:</strong></span>
<code class="literal">debug</code>, <code class="literal">release</code>,
<code class="literal">profile</code>.
</p>
<p>
The value <code class="literal">debug</code> expands to
</p>
<pre class="programlisting">
<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on
</pre>
<p>
The value <code class="literal">release</code> expands to
</p>
<pre class="programlisting">
<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off
</pre>
<p>
The value <code class="literal">profile</code> expands to the same as
<code class="literal">release</code>, plus:
</p>
<pre class="programlisting">
<profiling>on <debug-symbols>on
</pre>
<p>
Users can define their own build variants using the
<code class="computeroutput">variant</code> rule from the <code class="computeroutput">common</code> module.
</p>
<p>
<span class="bold"><strong>Note:</strong></span> Runtime debugging is on in
debug builds to suit the expectations of people used to various
IDEs.
</p>
</dd>
<dt>
<a name="bbv2.overview.builtins.features.link"></a><span class="term"><code class="literal">link</code></span>
</dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">shared</code>,
<code class="literal">static</code></p>
<p class="simpara">
A feature controling how libraries are built.
</p>
</dd>
<dt>
<a name="bbv2.overview.builtins.features.runtime-link"></a><span class="term"><code class="literal">runtime-link</code></span>
</dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">shared</code>,
<code class="literal">static</code></p>
<p class="simpara">
Controls if a static or shared C/C++ runtime should be used. There
are some restrictions how this feature can be used, for example
on some compilers an application using static runtime should
not use shared libraries at all, and on some compilers,
mixing static and shared runtime requires extreme care. Check
your compiler documentation for more details.
</p>
</dd>
<dt><span class="term"><code class="literal">threading</code></span></dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">single</code>,
<code class="literal">multi</code></p>
<p class="simpara">
Controls if the project should be built in multi-threaded mode. This feature does not
necessary change code generation in the compiler, but it causes the compiler to link
to additional or different runtime libraries, and define additional preprocessor
symbols (for example, <code class="computeroutput">_MT</code> on Windows and <code class="computeroutput">_REENTRANT</code> on Linux).
How those symbols affect the compiled code depends on the code itself.
</p>
</dd>
<dt><span class="term"><code class="literal">source</code></span></dt>
<dd>
The <code class="computeroutput"><source>X</code> feature has the same effect on
building a target as putting X in the list of sources. It is useful
when you want to add the same source to all targets in the project
(you can put <source> in requirements) or to conditionally
include a source (using conditional requirements, see <a class="xref" href="tutorial.html#bbv2.tutorial.conditions" title="Conditions and alternatives">the section called “Conditions and alternatives”</a>). See also the <code class="computeroutput"><library>
</code> feature.
</dd>
<dt><span class="term"><code class="literal">library</code></span></dt>
<dd>
This feature is almost equivalent to the <code class="computeroutput"><source></code>
feature, except that it takes effect only for linking. When you want
to link all targets in a Jamfile to certain library, the
<code class="computeroutput"><library></code> feature is preferred over
<code class="computeroutput"><source>X</code>—the latter will add the library to
all targets, even those that have nothing to do with libraries.
</dd>
<dt><span class="term"><a name="bbv2.builtin.features.dependency"></a>
<code class="literal">dependency</code></span></dt>
<dd>
Introduces a dependency on the target named by the value of this
feature (so it will be brought up-to-date whenever the target being
declared is). The dependency is not used in any other way.
</dd>
<dt><span class="term"><a name="bbv2.builtin.features.implicit-dependency"></a>
<code class="literal">implicit-dependency</code></span></dt>
<dd>
Indicates that the target named by the value of this feature
may produce files that are included by the sources of the
target being declared. See <a class="xref" href="tasks.html#bbv2.reference.generated_headers" title="Generated headers">the section called “Generated headers”</a>
for more information.
</dd>
<dt><span class="term"><a name="bbv2.builtin.features.use"></a>
<code class="literal">use</code></span></dt>
<dd>
Introduces a dependency on the target named by the value of this
feature (so it will be brought up-to-date whenever the target being
declared is), and adds its usage requirements to the build
properties
of the target being declared. The dependency is not used in any
other way. The primary use case is when you want the usage
requirements (such as <code class="computeroutput">#include</code> paths) of some library
to be applied, but do not want to link to it.
</dd>
<dt><span class="term"><a name="bbv2.reference.features.dll-path"></a>
<code class="literal">dll-path</code></span></dt>
<dd>
Specify an additional directory where the system should
look for shared libraries when the executable or shared
library is run. This feature only affects Unix
compilers. Plase see <a class="xref" href="faq.html#bbv2.faq.dll-path" title="Why are the dll-path and hardcode-dll-paths properties useful?">the section called “
Why are the <code class="literal">dll-path</code> and <code class="literal">hardcode-dll-paths
</code> properties useful?
”</a>
in <a class="xref" href="faq.html" title="Frequently Asked Questions">the section called “Frequently Asked Questions”</a> for details.
</dd>
<dt><span class="term"><code class="literal">hardcode-dll-paths</code></span></dt>
<dd>
<p class="simpara">
Controls automatic generation of dll-path properties.
</p>
<p><span class="bold"><strong>Allowed values:</strong></span>
<code class="literal">true</code>, <code class="literal">false</code>. This property is
specific to Unix systems. If an executable is built with
<code class="computeroutput"><hardcode-dll-paths>true</code>, the generated binary
will contain the list of all the paths to the used shared libraries.
As the result, the executable can be run without changing system
paths to shared libraries or installing the libraries to system
paths. This is very
convenient during development. Plase see the <a class="link" href="faq.html#bbv2.faq.dll-path" title="Why are the dll-path and hardcode-dll-paths properties useful?">FAQ entry</a> for details. Note that on Mac
OSX, the paths are unconditionally hardcoded by the linker, and it
is not possible to disable that behaviour.</p>
</dd>
<dt>
<span class="term"><code class="literal">cflags</code>, </span><span class="term"><code class="literal">cxxflags</code>, </span><span class="term"><code class="literal">linkflags</code></span>
</dt>
<dd>
The value of those features is passed without modification to the
corresponding tools. For <code class="computeroutput">cflags</code> that is both the C and
C++ compilers, for <code class="computeroutput">cxxflags</code> that is the C++ compiler
and for <code class="computeroutput">linkflags</code> that is the linker. The features are
handy when you are trying to do something special that cannot be
achieved by a higher-level feature in Boost.Build.
</dd>
<dt><span class="term"><code class="literal">include</code></span></dt>
<dd>
Specifies an additional include path that is to be passed to C and
C++ compilers.
</dd>
<dt><span class="term"><code class="literal">define</code></span></dt>
<dd>
Specifies an preprocessor symbol that should be defined on the command
line. You may either specify just the symbol, which will be defined
without any value, or both the symbol and the value, separated by
equal sign.
</dd>
<dt><span class="term"><code class="literal">warnings</code></span></dt>
<dd>
The <code class="computeroutput"><warnings></code> feature controls the warning level
of compilers. It has the following values:
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="computeroutput">off</code> - disables all warnings.</p></li>
<li class="listitem"><p><code class="computeroutput">on</code> - enables default warning level for the tool.</p></li>
<li class="listitem"><p><code class="computeroutput">all</code> - enables all warnings.</p></li>
</ul></div>
Default value is <code class="computeroutput">all</code>.
</dd>
<dt><span class="term"><code class="literal">warnings-as-errors</code></span></dt>
<dd>
The <code class="computeroutput"><warnings-as-errors></code> makes it possible to
treat warnings as errors and abort compilation on a warning. The
value <code class="computeroutput">on</code> enables this behaviour. The default value is
<code class="computeroutput">off</code>.
</dd>
<dt><span class="term"><code class="literal">build</code></span></dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">no</code></p>
<p>
The <code class="computeroutput">build</code> feature is used to conditionally disable
build of a target. If <code class="computeroutput"><build>no</code> is in properties
when building a target, build of that target is skipped. Combined
with conditional requirements this allows you to skip building some
target in configurations where the build is known to fail.
</p>
</dd>
<dt><span class="term"><a name="bbv2.builtin.features.tag"></a><code class="literal">tag</code></span></dt>
<dd>
<p>The <code class="literal">tag</code> feature is used to customize
the name of the generated files. The value should have the form:
</p>
<pre class="programlisting">@<em class="replaceable"><code>rulename</code></em></pre>
<p> where
<em class="replaceable"><code>rulename</code></em> should be a name of a rule with the
following signature:
</p>
<pre class="programlisting">rule tag ( name : type ? : property-set )</pre>
<p>
The rule will be called for each target with the default name computed
by Boost.Build, the type of the target, and property set. The rule can
either return a string that must be used as the name of the target, or
an empty string, in which case the default name will be used.
</p>
<p>Most typical use of the <code class="literal">tag</code> feature is to
encode build properties, or library version in library target names. You
should take care to return non-empty string from the tag rule only for
types you care about — otherwise, you might end up modifying
names of object files, generated header file and other targets for which
changing names does not make sense.</p>
</dd>
<dt><span class="term"><code class="literal">debug-symbols</code></span></dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">on</code>, <code class="literal">off</code>.</p>
<p>The <code class="literal">debug-symbols</code> feature specifies if
produced object files, executables and libraries should include
debug information.
Typically, the value of this feature is implicitly set by the
<code class="literal">variant</code> feature, but it can be explicitly
specified by the user. The most common usage is to build
release variant with debugging information.</p>
</dd>
<dt><span class="term"><code class="literal">runtime-debugging</code></span></dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">on</code>, <code class="literal">off</code>.</p>
<p>The <code class="literal">runtime-debugging</code> feature specifies if
produced object files, executables and libraries should include
behaviour useful only for debugging, such as asserts.
Typically, the value of this feature is implicitly set by the
<code class="literal">variant</code> feature, but it can be explicitly
specified by the user. The most common usage is to build
release variant with debugging output.</p>
</dd>
<dt><span class="term"><code class="literal">target-os</code></span></dt>
<dd>
<a name="bbv2.reference.features.target-os"></a><p>
The operating system for which the code is to be generated. The
compiler you used should be the compiler for that operating
system. This option causes Boost.Build to use naming conventions
suitable for that operating system, and adjust build process
accordingly. For example, with gcc, it controls if import
libraries are produced for shared libraries or not.
</p>
<p>The complete list of possible values for this feature is:
aix, bsd, cygwin, darwin, freebsd, hpux, iphone, linux, netbsd,
openbsd, osf, qnx, qnxnto, sgi, solaris, unix, unixware, windows.
</p>
<p>See <a class="xref" href="tasks.html#bbv2.tasks.crosscompile" title="Cross-compilation">the section called “Cross-compilation”</a> for details of
crosscompilation</p>
</dd>
<dt><span class="term"><code class="literal">architecture</code></span></dt>
<dd><p>The <code class="literal">architecture</code> features specifies
the general processor familty to generate code for.</p></dd>
<dt><span class="term"><code class="literal">instruction-set</code></span></dt>
<dd>
<p>
<span class="bold"><strong>Allowed values:</strong></span> depend on the used
toolset.
</p>
<p>The <code class="literal">instruction-set</code> specifies for which
specific instruction set the code should be generated. The
code in general might not run on processors with older/different
instruction sets.</p>
<p>While Boost.Build allows a large set of possible values
for this features, whether a given value works depends on which
compiler you use. Please see
<a class="xref" href="reference.html#bbv2.reference.tools.compilers" title="C++ Compilers">the section called “C++ Compilers”</a> for details.
</p>
</dd>
<dt><span class="term"><code class="literal">address-model</code></span></dt>
<dd>
<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">32</code>, <code class="literal">64</code>.</p>
<p>The <code class="literal">address-model</code> specifies if 32-bit or
64-bit code should be generated by the compiler. Whether this feature
works depends on the used compiler, its version, how the compiler is
configured, and the values of the <code class="literal">architecture</code>
<code class="literal">instruction-set</code>
features. Please see <a class="xref" href="reference.html#bbv2.reference.tools.compilers" title="C++ Compilers">the section called “C++ Compilers”</a>
for details.</p>
</dd>
<dt><span class="term"><code class="literal">c++-template-depth</code></span></dt>
<dd>
<p>
<span class="bold"><strong>Allowed values:</strong></span> Any positive
integer.
</p>
<p>
This feature allows configuring a C++ compiler with the maximal
template instantiation depth parameter. Specific toolsets may or may
not provide support for this feature depending on whether their
compilers provide a corresponding command-line option.
</p>
<p>
<span class="bold"><strong>Note:</strong></span> Due to some internal details
in the current Boost.Build implementation it is not possible to have
features whose valid values are all positive integer. As a
workaround a large set of allowed values has been defined for this
feature and, if a different one is needed, user can easily add it by
calling the feature.extend rule.
</p>
</dd>
<dt><span class="term"><code class="literal">embed-manifest</code></span></dt>
<dd>
<a class="indexterm" name="idp548240592"></a><a class="indexterm" name="idp548241696"></a><p>
<span class="bold"><strong>Allowed values:</strong></span> on, off.
</p>
<p>This feature is specific to the msvc toolset (see
<a class="xref" href="reference.html#bbv2.reference.tools.compiler.msvc" title="Microsoft Visual C++">the section called “Microsoft Visual C++”</a>),
and controls whether the manifest files should be embedded inside
executables and shared libraries, or placed alongside them. This
feature corresponds to the IDE option found in the project settings dialog,
under <span class="guimenu">Configuration Properties</span> → <span class="guisubmenu">Manifest Tool</span> → <span class="guisubmenu">Input and Output</span> → <span class="guimenuitem">Embed manifest</span>.
</p>
</dd>
<dt><span class="term"><code class="literal">embed-manifest-file</code></span></dt>
<dd>
<a class="indexterm" name="idp548249872"></a><a class="indexterm" name="idp548250976"></a><p>This feature is specific to the msvc toolset (see
<a class="xref" href="reference.html#bbv2.reference.tools.compiler.msvc" title="Microsoft Visual C++">the section called “Microsoft Visual C++”</a>),
and controls which manifest files should be embedded inside
executables and shared libraries. This
feature corresponds to the IDE option found in the project settings dialog,
under <span class="guimenu">Configuration Properties</span> → <span class="guisubmenu">Manifest Tool</span> → <span class="guisubmenu">Input and Output</span> → <span class="guimenuitem">Additional Manifest Files</span>.
</p>
</dd>
</dl></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.tools"></a>Builtin tools</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compilers">C++ Compilers</a></span></dt>
<dt><span class="section"><a href="reference.html#idp548567088">Third-party libraries</a></span></dt>
<dt><span class="section"><a href="reference.html#idp548603088">Documentation tools</a></span></dt>
</dl></div>
<p>Boost.Build comes with support for a large number of C++ compilers,
and other tools. This section documents how to use those tools.</p>
<p>Before using any tool, you must declare your intention, and possibly
specify additional information about the tool's configuration. This is
done by calling the <code class="computeroutput">using</code> rule, typically in your
<code class="filename">user-config.jam</code>, for example:</p>
<pre class="programlisting">
using gcc ;
</pre>
<p>additional parameters can be passed just like for other rules, for example:</p>
<pre class="programlisting">
using gcc : 4.0 : g++-4.0 ;
</pre>
<p>The options that can be passed to each tool are documented in the
subsequent sections.</p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.tools.compilers"></a>C++ Compilers</h4></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.gcc">GNU C++</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.darwin">Apple Darwin gcc</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.msvc">Microsoft Visual C++</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.intel">Intel C++</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.acc">HP aC++ compiler</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.borland">Borland C++ Compiler</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.como">Comeau C/C++ Compiler</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.cw">Code Warrior</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.dmc">Digital Mars C/C++ Compiler</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.hp_cxx">HP C++ Compiler for Tru64 Unix</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.sun">Sun Studio</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.vacpp">IBM Visual Age</a></span></dt>
</dl></div>
<p>This section lists all Boost.Build modules that support C++
compilers and documents how each one can be initialized. The name
of support module for compiler is also the value for
the <code class="computeroutput">toolset</code> feature that can be used to explicitly
request that compiler. </p>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="bbv2.reference.tools.compiler.gcc"></a>GNU C++</h5></div></div></div>
<p>The <code class="computeroutput">gcc</code> module supports the
<a href="http://gcc.gnu.org" target="_top">GNU C++ compiler</a>
on Linux, a number of Unix-like system including SunOS and on Windows
(either <a href="http://www.cygwin.com" target="_top">Cygwin</a> or
<a href="http://www.mingw.org" target="_top">MinGW</a>). On Mac OSX, it is recommended
to use system gcc, see <a class="xref" href="reference.html#bbv2.reference.tools.compiler.darwin" title="Apple Darwin gcc">the section called “Apple Darwin gcc”</a>.
</p>
<p>The <code class="computeroutput">gcc</code> module is initialized using the following
syntax:</p>
<pre class="programlisting">
using gcc : [<span class="optional"><em class="replaceable"><code>version</code></em></span>] : [<span class="optional"><em class="replaceable"><code>c++-compile-command</code></em></span>] : [<span class="optional"><em class="replaceable"><code>compiler options</code></em></span>] ;</pre>
<p>This statement may be repeated several times, if you want to configure several versions of the compiler.</p>
<p>
If the version is not explicitly specified, it will be
automatically detected by running the compiler with the <code class="computeroutput">-v</code>
option. If the command is not specified, the <span class="command"><strong>g++</strong></span>
binary will be searched in <code class="envar">PATH</code>.</p>
<p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="literal">cflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling C sources.</p></dd>
<dt><span class="term"><code class="literal">cxxflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling C++ sources.</p></dd>
<dt><span class="term"><code class="literal">compileflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling both C and C++ sources.</p></dd>
<dt><span class="term"><code class="literal">linkflags</code></span></dt>
<dd><p>Specifies additional command line options that will be
passed to the linker.</p></dd>
<dt><span class="term"><code class="literal">root</code></span></dt>
<dd><p>Specifies root directory of the compiler installation.
This option is necessary only if it is not possible to detect this
information from the compiler command—for example if the specified
compiler command is a user script.</p></dd>
<dt><span class="term"><code class="literal">rc</code></span></dt>
<dd><p>Specifies the resource compiler command
that will be used with the version of gcc that is being
configured. This setting makes sense only for Windows and only
if you plan to use resource files. By
default <span class="command"><strong>windres</strong></span> will be used.</p></dd>
<dt><span class="term"><code class="literal">rc-type</code></span></dt>
<dd><p>Specifies the type of resource compiler. The value can
be either <code class="computeroutput">windres</code> for msvc resource compiler,
or <code class="computeroutput">rc</code> for borland's resource compiler.</p></dd>
</dl></div>
<a class="indexterm" name="idp548295680"></a>
In order to compile 64-bit applications, you have to specify
<code class="computeroutput">address-model=64</code>, and the <code class="computeroutput">instruction-set</code>
feature should refer to a 64 bit processor. Currently, those
include <code class="literal">nocona</code>, <code class="literal">opteron</code>,
<code class="literal">athlon64</code> and <code class="literal">athlon-fx</code>.
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="bbv2.reference.tools.compiler.darwin"></a>Apple Darwin gcc</h5></div></div></div>
<p>The <code class="computeroutput">darwin</code> module supports the version of gcc that is
modified and provided by Apple. The configuration is essentially identical
to that of the gcc module.
</p>
<p>
<a class="indexterm" name="idp548304144"></a>
The darwin toolset can generate so called "fat"
binaries—binaries that can run support more than one
architecture, or address mode. To build a binary that can run both
on Intel and PowerPC processors, specify
<code class="computeroutput">architecture=combined</code>. To build a binary that can run
both in 32-bit and 64-bit modes, specify
<code class="computeroutput">address-model=32_64</code>. If you specify both of those
properties, a "4-way" fat binary will be generated.
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="bbv2.reference.tools.compiler.msvc"></a>Microsoft Visual C++</h5></div></div></div>
<p>The <code class="computeroutput">msvc</code> module supports the
<a href="http://msdn.microsoft.com/visualc/" target="_top">Microsoft Visual
C++</a> command-line tools on Microsoft Windows. The supported
products and versions of command line tools are listed below:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Visual Studio 2010—10.0</p></li>
<li class="listitem"><p>Visual Studio 2008—9.0</p></li>
<li class="listitem"><p>Visual Studio 2005—8.0</p></li>
<li class="listitem"><p>Visual Studio .NET 2003—7.1</p></li>
<li class="listitem"><p>Visual Studio .NET—7.0</p></li>
<li class="listitem"><p>Visual Studio 6.0, Service Pack 5—6.5</p></li>
</ul></div>
<p>The <code class="computeroutput">msvc</code> module is initialized using the following
syntax:</p>
<pre class="programlisting">
using msvc : [<span class="optional"><em class="replaceable"><code>version</code></em></span>] : [<span class="optional"><em class="replaceable"><code>c++-compile-command</code></em></span>] : [<span class="optional"><em class="replaceable"><code>compiler options</code></em></span>] ;
</pre>
<p>This statement may be repeated several times, if you want to configure several versions of the compiler.</p>
<p>If the version is not explicitly specified, the most recent
version found in the registry will be used instead. If the special
value <code class="computeroutput">all</code> is passed as the version, all versions found in
the registry will be configured. If a version is specified, but the
command is not, the compiler binary will be searched in standard
installation paths for that version, followed by <code class="envar">PATH</code>.
</p>
<p>The compiler command should be specified using forward slashes,
and quoted.</p>
<p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="literal">cflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling C sources.</p></dd>
<dt><span class="term"><code class="literal">cxxflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling C++ sources.</p></dd>
<dt><span class="term"><code class="literal">compileflags</code></span></dt>
<dd><p>Specifies additional compiler flags that will be used when
compiling both C and C++ sources.</p></dd>
<dt><span class="term"><code class="literal">linkflags</code></span></dt>
<dd><p>Specifies additional command line options that will be
passed to the linker.</p></dd>
<dt><span class="term"><code class="literal">assembler</code></span></dt>
<dd><p>The command that compiles assembler sources. If
not specified, <span class="command"><strong>ml</strong></span> will be used. The command
will be invoked after the setup script was executed and adjusted
the <code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">compiler</code></span></dt>
<dd><p>The command that compiles C and C++ sources. If
not specified, <span class="command"><strong>cl</strong></span> will be used. The command
will be invoked after the setup script was executed and adjusted
the <code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">compiler-filter</code></span></dt>
<dd><p>Command through which to pipe the output of
running the compiler. For example to pass the output to STLfilt.
</p></dd>
<dt><span class="term"><code class="literal">idl-compiler</code></span></dt>
<dd><p>The command that compiles Microsoft COM interface
definition files. If not specified, <span class="command"><strong>midl</strong></span> will
be used. The command will be invoked after the setup script was
executed and adjusted the <code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">linker</code></span></dt>
<dd><p>The command that links executables and dynamic
libraries. If not specified, <span class="command"><strong>link</strong></span> will be used.
The command will be invoked after the setup script was executed
and adjusted the <code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">mc-compiler</code></span></dt>
<dd><p>The command that compiles Microsoft message
catalog files. If not specified, <span class="command"><strong>mc</strong></span> will be
used. The command will be invoked after the setup script was
executed and adjusted the <code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">resource-compiler</code></span></dt>
<dd><p>The command that compiles resource files. If not
specified, <span class="command"><strong>rc</strong></span> will be used. The command will be
invoked after the setup script was executed and adjusted the
<code class="envar">PATH</code> variable.</p></dd>
<dt><span class="term"><code class="literal">setup</code></span></dt>
<dd><p>The filename of the global environment setup
script to run before invoking any of the tools defined in this
toolset. Will not be used in case a target platform specific
script has been explicitly specified for the current target
platform. Used setup script will be passed the target platform
identifier (x86, x86_amd64, x86_ia64, amd64 or ia64) as a
arameter. If not specified a default script is chosen based on the
used compiler binary, e.g. <span class="command"><strong>vcvars32.bat</strong></span> or
<span class="command"><strong>vsvars32.bat</strong></span>.</p></dd>
<dt>
<span class="term"><code class="literal">setup-amd64</code>, </span><span class="term"><code class="literal">setup-i386</code>, </span><span class="term"><code class="literal">setup-ia64</code></span>
</dt>
<dd><p>Th