<title>If and How to Build a Boost.Math Library, and its Examples and Tests</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
-<link rel="home" href="../index.html" title="Math Toolkit 2.10.0">
+<link rel="home" href="../index.html" title="Math Toolkit 2.11.0">
<link rel="up" href="../overview.html" title="Chapter 1. Overview">
<link rel="prev" href="perf_over1.html" title="Performance">
<link rel="next" href="history1.html" title="History and What's New">
and program size.
</p>
<p>
- Refer to <a class="link" href="../extern_c.html" title='Chapter 8. TR1 and C99 external "C" Functions'>C99 and C++ TR1 C-style Functions</a>
+ Refer to <a class="link" href="../extern_c.html" title='Chapter 9. TR1 and C99 external "C" Functions'>C99 and C++ TR1 C-style Functions</a>
for pros and cons of using the TR1 components as opposed to the header only
ones.
</p>
library is if you want to use the <code class="computeroutput"><span class="keyword">extern</span>
<span class="string">"C"</span></code> functions declared in
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>. To build this using Boost.Build, from
- a commandline boost-root directory issue a command like:
+ a command-line boost-root directory issue a command like:
</p>
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">gcc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">math</span> <span class="identifier">install</span>
</pre>
Optionally the sources in <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">tr1</span></code>
have support for using <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">src</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">/</span><span class="identifier">pch</span><span class="special">.</span><span class="identifier">hpp</span></code> as a precompiled header <span class="emphasis"><em>if
your compiler supports precompiled headers.</em></span> Note that normally this
- header is a do-nothing include: to activate the header so that it #includes
- everything required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
- on the command line, both when building the pre-compiled header and when building
- the sources. Boost.Build will do this automatically when appropriate.
+ header is a do-nothing <code class="computeroutput"><span class="preprocessor">#include</span></code>
+ to activate the header so that it #includes everything required by all the
+ sources you will need to define BOOST_BUILD_PCH_ENABLED on the command line,
+ both when building the pre-compiled header and when building the sources. Boost.Build
+ will do this automatically when appropriate.
</p>
<h5>
<a name="math_toolkit.building.h1"></a>
<p>
You will also need to build and link to the Boost.Regex library for many of
the tests: this can built from the command line by following the <a href="http://www.boost.org/doc/libs/release/more/getting_started/index.html" target="_top">getting
- started guide</a>, using a command such as:
+ started guide</a>, using commands such as:
</p>
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">gcc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">regex</span> <span class="identifier">install</span>
</pre>
<p>
- or
+ or bjam toolset=clang --with-regex install or bjam toolset=gcc,clang --with-regex
+ install or bjam toolset=msvc --with-regex --build-type=complete stage
</p>
-<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">toolset</span><span class="special">=</span><span class="identifier">msvc</span> <span class="special">--</span><span class="identifier">with</span><span class="special">-</span><span class="identifier">regex</span> <span class="special">--</span><span class="identifier">build</span><span class="special">-</span><span class="identifier">type</span><span class="special">=</span><span class="identifier">complete</span> <span class="identifier">stage</span>
-</pre>
<p>
depending on whether you are on Linux or Windows.
</p>
<p>
Many of the tests have optional precompiled header support using the header
<code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">pch</span><span class="special">.</span><span class="identifier">hpp</span></code>. Note that normally this header is a
- do-nothing include: to activate the header so that it #includes everything
- required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
+ do-nothing include: to activate the header so that it <code class="computeroutput"><span class="preprocessor">#include</span></code>s
+ everything required by all the sources you will need to define BOOST_BUILD_PCH_ENABLED
on the command line, both when building the pre-compiled header and when building
the sources. Boost.Build will do this automatically when appropriate.
</p>