install_boost.sh 781 Bytes
Newer Older
1 2 3 4 5 6 7
#! /bin/bash

set -e
set -x

ROOT=${PWD}

Praetorius, Simon's avatar
Praetorius, Simon committed
8
BOOST_VERSION="1.64.0"
9 10
BOOST_FILENAME="boost_${BOOST_VERSION//[.]/_}.tar.gz"

Praetorius, Simon's avatar
Praetorius, Simon committed
11 12
BOOST_PREFIX=${ROOT}/../packages/boost/${BOOST_VERSION}
mkdir -p ${BOOST_PREFIX}
13 14 15

BUILD_DIR=/tmp/$USER/boost_build
mkdir -p ${BUILD_DIR}
16

Praetorius, Simon's avatar
Praetorius, Simon committed
17 18 19 20 21
# download boost
curl -SL "http://netcologne.dl.sourceforge.net/project/boost/boost/${BOOST_VERSION}/${BOOST_FILENAME}" \
  | tar --strip-components=1 -xzC ${BUILD_DIR}
cd ${BUILD_DIR}
  
22
# install boost
Praetorius, Simon's avatar
Praetorius, Simon committed
23 24 25 26 27
./bootstrap.sh --prefix=${BOOST_PREFIX} \
                --with-libraries=system,iostreams,filesystem,program_options,date_time,test,thread,mpi,serialization
echo "using mpi ;" >> project-config.jam
./b2 -s NO_BZIP2=1 -s NO_ZLIB=1 cxxflags="-std=c++14" --build-type=minimal variant=release install
rm -rf ${BUILD_DIR}