aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build/boost/build_travis.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-13 03:11:07 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-13 05:47:36 +0300
commit9a1aba21955bb5f4cf3e7720940564cab8fcde9d (patch)
tree6c37450aeed5e92403a7669636fa1594a104b0d2 /build/boost/build_travis.sh
parentrefactor build/boost/build_travis.sh (diff)
downloadcmake-common-9a1aba21955bb5f4cf3e7720940564cab8fcde9d.tar.gz
cmake-common-9a1aba21955bb5f4cf3e7720940564cab8fcde9d.zip
build/boost: add generic build.py script
Diffstat (limited to '')
-rwxr-xr-xbuild/boost/build_travis.sh82
1 files changed, 0 insertions, 82 deletions
diff --git a/build/boost/build_travis.sh b/build/boost/build_travis.sh
deleted file mode 100755
index 267262d..0000000
--- a/build/boost/build_travis.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com>
-# This file is part of the "cmake-common" project.
-# For details, see https://github.com/egor-tensin/cmake-common.
-# Distributed under the MIT License.
-
-# This script is used during a Travis build to download and build Boost.
-# Input:
-# * environment variables $travis_boost_version, $configuration and $platform.
-# Output:
-# * unpacked Boost distribution at $HOME/boost_X_YY_Z,
-# * built libraries at $HOME/boost_X_YY_Z/stage/$platform/${configuration,,}.
-
-set -o errexit -o nounset -o pipefail -o xtrace
-
-readonly base_dir="$HOME"
-readonly script_name="$( basename -- "${BASH_SOURCE[0]}" )"
-
-dump() {
- local msg
- for msg; do
- echo "$script_name: $msg"
- done
-}
-
-set_paths() {
- local boost_fs="boost_${travis_boost_version//\./_}"
-
- readonly boost_archive="$boost_fs.tar.gz"
- readonly boost_url="https://dl.bintray.com/boostorg/release/$travis_boost_version/source/$boost_archive"
- readonly boost_dir="$base_dir/$boost_fs"
-}
-
-set_address_model() {
- if [ "$platform" = x64 ]; then
- readonly address_model=64
- elif [ "$platform" = x86 ]; then
- readonly address_model=32
- else
- dump "unsupported platform: $platform" >&2
- exit 1
- fi
-}
-
-set_configuration() {
- configuration="${configuration,,}"
- readonly configuration
-}
-
-set_parameters() {
- set_paths
- set_address_model
- set_configuration
-}
-
-download() {
- wget --quiet -O "$boost_archive" -- "$boost_url"
- tar xzvf "$boost_archive" > /dev/null
-}
-
-build() {
- cd -- "$boost_dir"
-
- ./bootstrap.sh
-
- ./b2 \
- "address-model=$address_model" \
- variant="$configuration" \
- "--stagedir=$boost_dir/stage/$platform/$configuration" \
- "$@"
-}
-
-main() {
- pushd -- "$base_dir"
- trap 'popd' EXIT
- set_parameters
- download
- build "$@"
-}
-
-main "$@"