Skip to content

Instantly share code, notes, and snippets.

@edwardstock
Last active Dec 11, 2018
Embed
What would you like to do?
Boost automated build script
#!/usr/bin/env bash
set -o xtrace
# https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz
BOOST_MAJOR_VER="1"
BOOST_MINOR_VER="68"
BOOST_PATCH_VER="0"
BOOST_VER="${BOOST_MAJOR_VER}.${BOOST_MINOR_VER}.${BOOST_PATCH_VER}"
BOOST_VER_US="${BOOST_MAJOR_VER}_${BOOST_MINOR_VER}_${BOOST_PATCH_VER}"
if [ ! -f "${PWD}/boost_${BOOST_VER_US}.tar.gz" ]
then
wget https://dl.bintray.com/boostorg/release/${BOOST_VER}/source/boost_${BOOST_VER_US}.tar.gz
fi
if [ ! -d "${PWD}/boost_${BOOST_VER_US}" ]
then
tar -xvf "${PWD}/boost_${BOOST_VER_US}.tar.gz"
fi
#The Boost libraries requiring separate building and installation are:
# - atomic
# - chrono
# - container
# - context
# - contract
# - coroutine
# - date_time
# - exception
# - fiber
# - filesystem
# - graph
# - graph_parallel
# - iostreams
# - locale
# - log
# - math
# - mpi
# - program_options
# - python
# - random
# - regex
# - serialization
# - signals
# - stacktrace
# - system
# - test
# - thread
# - timer
# - type_erasure
# - wave
cd boost_${BOOST_VER_US}
./bootstrap.sh --prefix=/opt/boost${BOOST_VER_US}
./b2 install --prefix=/opt/boost${BOOST_VER_US} \
--without-wave \
--without-python \
--without-graph \
--without-graph_parallel \
--without-fiber \
--without-test \
link=static variant=release threading=multi cxxflags="-fPIC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment