1.. Copyright David Abrahams 2006. Distributed under the Boost 2.. Software License, Version 1.0. (See accompanying 3.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 5Install Boost.Build 6................... 7 8Boost.Build_ is a text-based system for developing, testing, and 9installing software. First, you'll need to build and 10install it. To do this: 11 121. Go to the directory ``tools``\ |/|\ ``build``\ |/|. 132. Run |bootstrap| 143. Run ``b2 install --prefix=``\ *PREFIX* where *PREFIX* is 15 the directory where you want Boost.Build to be installed 164. Add *PREFIX*\ |/|\ ``bin`` to your PATH environment variable. 17 18.. _Boost.Build: ../../tools/build/index.html 19.. _Boost.Build documentation: Boost.Build_ 20 21.. _toolset: 22.. _toolset-name: 23 24Identify Your Toolset 25..................... 26 27First, find the toolset corresponding to your compiler in the 28following table (an up-to-date list is always available `in the 29Boost.Build documentation`__). 30 31__ https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.tools 32 33.. Note:: If you previously chose a toolset for the purposes of 34 `building b2`_, you should assume it won't work and instead 35 choose newly from the table below. 36 37.. _building b2: ../../doc/html/bbv2/installation.html 38 39+-----------+--------------------+------------------------------------------------------------+ 40|Toolset |Vendor |Notes | 41|Name | | | 42+===========+====================+============================================================+ 43|``acc`` |Hewlett Packard |Only very recent versions are known to work well with Boost | 44+-----------+--------------------+------------------------------------------------------------+ 45|``borland``|Borland | | 46+-----------+--------------------+------------------------------------------------------------+ 47|``como`` |Comeau Computing |Using this toolset may require configuring__ another | 48| | |toolset to act as its backend. | 49+-----------+--------------------+------------------------------------------------------------+ 50|``darwin`` |Apple Computer |Apple's version of the GCC toolchain with support for | 51| | |Darwin and MacOS X features such as frameworks. | 52+-----------+--------------------+------------------------------------------------------------+ 53|``gcc`` |The Gnu Project |Includes support for Cygwin and MinGW compilers. | 54+-----------+--------------------+------------------------------------------------------------+ 55|``hp_cxx`` |Hewlett Packard |Targeted at the Tru64 operating system. | 56+-----------+--------------------+------------------------------------------------------------+ 57|``intel`` |Intel | | 58+-----------+--------------------+------------------------------------------------------------+ 59|``msvc`` |Microsoft | | 60+-----------+--------------------+------------------------------------------------------------+ 61|``sun`` |Oracle |Only very recent versions are known to work well with | 62| | |Boost. Note that the Oracle/Sun compiler has a large number| 63| | |of options which effect binary compatibility: it is vital | 64| | |that the libraries are built with the same options that your| 65| | |appliction will use. In particular be aware that the default| 66| | |standard library may not work well with Boost, *unless you | 67| | |are building for C++11*. The particular compiler options you| 68| | |need can be injected with the b2 command line options | 69| | |``cxxflags=``and ``linkflags=``. For example to build with | 70| | |the Apache standard library in C++03 mode use | 71| | |``b2 cxxflags=-library=stdcxx4 linkflags=-library=stdcxx4``.| 72+-----------+--------------------+------------------------------------------------------------+ 73|``vacpp`` |IBM |The VisualAge C++ compiler. | 74+-----------+--------------------+------------------------------------------------------------+ 75 76__ Boost.Build_ 77 78If you have multiple versions of a particular compiler installed, 79you can append the version number to the toolset name, preceded by 80a hyphen, e.g. ``intel-9.0`` or 81``borland-5.4.3``. |windows-version-name-caveat| 82 83 84.. _build directory: 85.. _build-directory: 86 87Select a Build Directory 88........................ 89 90Boost.Build_ will place all intermediate files it generates while 91building into the **build directory**. If your Boost root 92directory is writable, this step isn't strictly necessary: by 93default Boost.Build will create a ``bin.v2/`` subdirectory for that 94purpose in your current working directory. 95 96Invoke ``b2`` 97............... 98 99.. |build-directory| replace:: *build-directory* 100.. |toolset-name| replace:: *toolset-name* 101 102Change your current directory to the Boost root directory and 103invoke ``b2`` as follows: 104 105.. parsed-literal:: 106 107 b2 **--build-dir=**\ |build-directory|_ **toolset=**\ |toolset-name|_ |build-type-complete| stage 108 109For a complete description of these and other invocation options, 110please see the `Boost.Build documentation`__. 111 112__ http://www.boost.org/build/doc/html/bbv2/overview/invocation.html 113 114