Skip to content

Instantly share code, notes, and snippets.

@ax3l
Last active August 14, 2017 13:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ax3l/7450482 to your computer and use it in GitHub Desktop.
Save ax3l/7450482 to your computer and use it in GitHub Desktop.
Boost Compile Time Libs and Names

Boost 1.62

List of all libs here. Non header-only libraries (via ./bootstrap.sh --show-libraries):

The Boost libraries requiring separate building and installation are:
    - atomic
    - chrono
    - container
    - context
    - coroutine
    - coroutine2
    - date_time
    - exception
    - fiber
    - filesystem
    - graph
    - graph_parallel
    - iostreams
    - locale
    - log
    - math
    - metaparse
    - mpi
    - program_options
    - python
    - random
    - regex
    - serialization
    - signals
    - system
    - test
    - thread
    - timer
    - type_erasure
    - wave
  • boost::math::gcd can be header only. The file <boost/math/common_factor.hpp> provides the legacy include, (since _rt/_ct) were splitted quite recent.

Transient Dependencies

Some boost libraries require other boost libraries which also need to be compiled. During the boost build, those are not always triggered to be build and can be missing!

It further complicates the setup of downstream projects, since the list of transient dependencies in FindBoost.cmake is updated manually. That leads to the situation, that newer boost releases "do not know" their transient dependencies if used with an older CMake release. In the furture, when Boost switches to an all-CMake install this will hopefully change.

For now, better know your transient boost dependencies and request them explicitly instead of relying on boost.

  elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400)
    set(_Boost_CHRONO_DEPENDENCIES system)
    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
    set(_Boost_COROUTINE_DEPENDENCIES context system)
    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
    set(_Boost_FILESYSTEM_DEPENDENCIES system)
    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
    set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
    set(_Boost_MPI_DEPENDENCIES serialization)
    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
    set(_Boost_RANDOM_DEPENDENCIES system)
    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
  else()
    message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}")
    set(_Boost_IMPORTED_TARGETS FALSE)
  endif()

Example Build

./bootstrap.sh --with-python=`which python` \
               --with-python-root=$PYTHON_ROOT \
               --with-libraries=atomic,chrono,context,date_time,fiber,filesystem,program_options,regex,serialization,system,thread,math \
               --prefix=$HOME/lib/boost_1_62_0_python
./b2 -j8
./b2 install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment