...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
In case you would like to use the shared library variant or the static library variant of the Unit Test Framework, the library needs to be built. Building the Unit Test Framework is in fact quite easy.
In the sequel, we define
boost_path
refers to
the location where the boost archive was deflated
boost_installation_prefix
refers to the location where you want to install the Unit Test
Framework
More documentation about Boost's build system can be found here.
You need to have a compilation toolchain. Visual Studio Express
is such one, freely available from the Microsoft website. Once installed,
open a Visual Studio Command Line tools prompt and build
the Boost build program b2
(see the link above). You will then be able to compile the Unit
Test Framework with different variants.
For building 32bits libraries, open a console window and enter the following commands:
> cd $boost_path > bootstrap.bat > b2 address-model=32 architecture=x86 --with-test link=static \ > --prefix=$boost_installation_prefix install
For building 64bits libraries, the commands become:
> cd $boost_path > bootstrap.bat > b2 address-model=64 architecture=x86 --with-test link=static \ > --prefix=$boost_installation_prefix install
In order to build the shared library variant, the directive link=static
should be replaced by link=shared
on the above command lines. For instance, for 64bits builds, the commands
become:
> cd $boost_path > bootstrap.bat > b2 address-model=64 architecture=x86 --with-test link=shared --prefix=$boost_installation_prefix install
For Unix/Linux/OSX operating system, the build of the Unit Test Framework is very similar to the one on Windows:
> cd $boost_path > ./bootstrap.sh > ./b2 --with-test --prefix=$boost_installation_prefix install