8 | | 3. Configure the Boost source tree with CMake's configuration tool. This step differs depending on whether you are using CMake's GUI on Microsoft Windows or whether you are using the command-line tools provided on Unix. |
9 | | a. '''On Windows''': Run CMake by selecting it from the Start menu. |
10 | | i. Use the `Browse...` button to point CMake at the Boost source code in `$BOOST_ROOT`. |
11 | | i. Use the second `Browse...` button to select the directory where Boost will build binaries. |
12 | | i. CMake will ask you what kind of project files or make files to build. If you're using Microsoft Visual Studio, select the appropriate version to generate project files. Otherwise, you can use Borland's make files, generate NMake files, etc. |
13 | | i. Click "Configure" to configure Boost, which will search for various libraries on your system and prepare the build. |
14 | | i. If you want, you can edit various options in the CMake GUI. These options will affect what libraries are built and how. Each time you finish editing options, click "Configure". |
15 | | i. When you are done, click "OK" to generate project files. |
16 | | b. '''On Unix''': |
17 | | i. Create a new directory that will hold the binaries that CMake builds. This document will assume you have created used the directory name `boost-bin` for these binaries, and that this directory is not inside $BOOST_ROOT: |
18 | | {{{ |
19 | | mkdir boost-bin |
20 | | }}} |
21 | | i. Change into the binary directory you have just created: |
22 | | {{{ |
23 | | cd boost-bin |
24 | | }}} |
25 | | i. Run the CMake configuration program, providing it with the Boost source directory: |
26 | | {{{ |
27 | | ccmake $BOOST_ROOT |
28 | | }}} |
29 | | i. Press `c` (for (c)onfigure) to perform the preliminary configuration of the CMake build system. |
30 | | i. If you want, you can edit various options in the CMake interface. These options will affect what libraries are built and how. Each time you finish editing options, press `c` to reconfigure. '''Mac OS X users''': to build universal binaries, change the value of `CMAKE_OSX_ARCHITECTURES` to `ppc;i386` in the CMake configuration. |
31 | | i. When the options you have selected have stabilized, CMake will give you the (g)enerate option. If you do not see this option, press `c` again to reconfigure. Finally, press `g` to generate makefiles and exit. |
| 19 | * Configure the Boost source tree with CMake's configuration tool. This step differs depending on whether you are using CMake's GUI on Microsoft Windows or whether you are using the command-line tools provided on Unix. |
| 20 | * '''On Windows''': Run CMake by selecting it from the Start menu. |
| 21 | * Use the `Browse...` button to point CMake at the Boost source code in `$BOOST\src`. |
| 22 | * Use the second `Browse...` button to select the directory where Boost will build binaries, `$BOOST\build`. |
| 23 | * CMake will ask you what kind of project files or make files to build. If you're using Microsoft Visual Studio, select the appropriate version to generate project files. Otherwise, you can use Borland's make files, generate NMake files, etc. |
| 24 | * Click "Configure" to configure Boost, which will search for various libraries on your system and prepare the build. |
| 25 | * If you want, you can edit various options in the CMake GUI. These options will affect what libraries are built and how. Each time you finish editing options, click "Configure". |
| 26 | * When you are done, click "OK" to generate project files. |
| 27 | * '''On Unix''': |
| 28 | * Create the directory that will hold the binaries that CMake builds: |
| 29 | {{{ |
| 30 | mkdir $BOOST/build |
| 31 | }}} |
| 32 | * Change into the binary directory you have just created: |
| 33 | {{{ |
| 34 | cd $BOOST/build |
| 35 | }}} |
| 36 | * Run the CMake configuration program, providing it with the Boost source directory: |
| 37 | {{{ |
| 38 | cmake $BOOST/src |
| 39 | }}} |
35 | | 4. Build Boost: Like configuration, the way in which one builds Boost with CMake differs from one platform to another, depending on your platform and how you configured CMake. Either way, you'll be using the tools provided to you by your compiler or operating system vendor. |
36 | | a. '''Microsoft Visual Studio''': If you have generated project files for Microsoft Visual Studio, you will need to start up Visual Studio to build Boost. Once Visual Studio has loaded, load the solution or project`Boost` from the Boost binary directory you set in the CMake configuration earlier. Then, just click "Build" to build all of Boost. |
37 | | a. '''On Unix''' (and when using makefile variants on Microsoft Windows): If you are on Unix, you will build Boost using standard "make" tools. Change into the binary directory we created and configured earlier, than run `make`: |
| 43 | * Build Boost: Like configuration, the way in which one builds Boost with CMake differs from one platform to another, depending on your platform and how you configured CMake. Either way, you'll be using the tools provided to you by your compiler or operating system vendor. |
| 44 | * '''Microsoft Visual Studio''': If you have generated project files for Microsoft Visual Studio, you will need to start up Visual Studio to build Boost. Once Visual Studio has loaded, load the solution or project`Boost` from the Boost binary directory you set in the CMake configuration earlier. Then, just click "Build" to build all of Boost. |
| 45 | * '''On Unix''' (and when using makefile variants on Microsoft Windows): If you are on Unix, you will build Boost using standard "make" tools. Change into the binary directory we created and configured earlier, than run `make`: |