diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-09 08:50:34 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-09 09:21:31 +0300 |
commit | 8706fa3939a82975f6e627900f52680de2ddbb49 (patch) | |
tree | 8741b1f2af1df0403ce66a842074866f06a613d8 /.travis/build.sh | |
parent | update cmake-common (diff) | |
download | math-server-8706fa3939a82975f6e627900f52680de2ddbb49.tar.gz math-server-8706fa3939a82975f6e627900f52680de2ddbb49.zip |
use CMake's install() for predictable paths
This will allow to merge the scripts for the two CIs in the future,
hopefully.
Diffstat (limited to '')
-rwxr-xr-x | .travis/build.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.travis/build.sh b/.travis/build.sh index 5c86ac0..021ec97 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -7,6 +7,7 @@ readonly boost_dir="$HOME/$boost_fs" readonly boost_librarydir="$boost_dir/stage/$arch/$build_type/lib" readonly build_dir="$HOME/build" +readonly install_dir="$HOME/install" main() { mkdir -p -- "$build_dir" @@ -14,12 +15,13 @@ main() { cmake \ -D "CMAKE_BUILD_TYPE=$build_type" \ -D "CMAKE_CXX_STANDARD_LIBRARIES=-lpthread" \ + -D "CMAKE_INSTALL_PREFIX=$install_dir" \ -D "BOOST_ROOT=$boost_dir" \ -D "BOOST_LIBRARYDIR=$boost_librarydir" \ -D ENABLE_TESTS=ON \ "$TRAVIS_BUILD_DIR" - cmake --build . -- -j - ./test/unit_tests/unit_tests --log_level=all + cmake --build . --config "$build_type" --target install -- -j + "$install_dir/bin/unit_tests" --log_level=all } main |