aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis/build.sh
blob: 2e721f3592239543b98cf30c176fce5a668f52ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash

set -o errexit -o nounset -o pipefail -o xtrace

readonly boost_fs="boost_${boost_version//\./_}"
readonly boost_dir="$HOME/$boost_fs"
readonly boost_librarydir="$boost_dir/stage/$arch/$build_type/lib"

readonly build_dir="$HOME/build"

main() {
    mkdir -p -- "$build_dir"
    cd -- "$build_dir"
    cmake                                           \
        -D "CMAKE_BUILD_TYPE=$build_type"           \
        -D "CMAKE_CXX_STANDARD_LIBRARIES=-lpthread" \
        -D "BOOST_ROOT=$boost_dir"                  \
        -D "BOOST_LIBRARYDIR=$boost_librarydir"     \
        -D Boost_USE_STATIC_LIBS=ON                 \
        -D ENABLE_TESTS=ON                          \
        "$TRAVIS_BUILD_DIR"
    cmake --build . -- -j
    ./test/unit_tests/unit_tests --log_level=all
}

main