Skip to content

Commit

Permalink
Travis build script: add extra debugging.
Browse files Browse the repository at this point in the history
This script can be useful as a shortcut for command-line builds, but not if you
forget to set TEST_TARGET, so now it errors if you do.
  • Loading branch information
qris committed Dec 21, 2016
1 parent da98a81 commit e849726
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion infrastructure/travis-build.sh
Expand Up @@ -13,11 +13,16 @@ fi
ccache -s

if [ "$BUILD" = 'cmake' ]; then
if [ -z "$TEST_TARGET" ]; then
echo "TEST_TARGET must be set to 'release' or 'debug' for CMake builds"
exit 2
fi

cd `dirname $0`
mkdir -p cmake/build
cd cmake/build
cmake --version
cmake -DCMAKE_BUILD_TYPE:STRING=$TEST_TARGET ..
cmake -DCMAKE_BUILD_TYPE:STRING=$TEST_TARGET "$@" ..
make install
[ "$TEST" = "n" ] || ctest -C $TEST_TARGET -V
else
Expand Down

0 comments on commit e849726

Please sign in to comment.