Boost.Build: Simple steps to use Boost.Build

4 views
Skip to first unread message

Copper Hill

unread,
Jul 1, 2009, 5:55:27 AM7/1/09
to worldhunter
1. Copy D:\tmp\boost_1_39_0\tools\build\v2 to D:\tools\boost-build
2. Copy bjam.exe to D:\tools\
3. set BOOST_BUILD_PATH=D:\tools\boost-build
4. set path=D:\tools;%path%;

Boost.Build is a text-based system for developing, testing, and
installing software. To use it, you'll need an executable called bjam.

Boost.Build's only dependency is a C compiler, so it's easy to setup.
You can even include all of Boost.Build in your project. Boost.Build
does not depend on C++ Boost in any way.
file:///D:/tmp/boost_1_39_0/tools/build/v2/index.html

bjam is the command-line tool that drives the Boost Build system.
http://www.boost.org/boost-build2/doc/html/bbv2/installation.html
http://www.boost.org/boost-build2/doc/html/index.html

When bjam is invoked, it always needs to be able to find the
Boost.Build root directory, where the interpreted source code of
Boost.Build is located. There are two ways to tell bjam about the root
directory:

* Set the environment variable BOOST_BUILD_PATH to the absolute
path of the Boost.Build root directory.
* At the root directory of your project or in any of its parent
directories, create a file called boost-build.jam, with a single
line:
boost-build /path/to/boost.build ;

Hong Zhaogang

unread,
Jul 1, 2009, 11:22:17 PM7/1/09
to worldhunter
The Boost.Build subset of boost is also distributed separately, for
those who are only interested in getting a build tool. The top-level
directory of a Boost.Build distribution contains all the
subdirectories of the tools/build/v2 subdirectory from a full Boost
distribution, so it is itself a valid Boost.Build root directory. It
also contains the tools/jam/src subdirectory of a full Boost
distribution, so you can rebuild Boost.Jam from source.

By default, debug variant is built. Now, to build the release variant
of hello, invoke:
bjam release

Build boost thread library:
cd %boost_root%
bjam thread release
Reply all
Reply to author
Forward
0 new messages