-
Notifications
You must be signed in to change notification settings - Fork 17
/
travis-build.sh
executable file
·46 lines (39 loc) · 1.03 KB
/
travis-build.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
set -e
set -x
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
# Travis appears to have Boost and OpenSSL installed already:
# brew install boost ccache openssl
ls /usr/local /usr/local/opt /usr/local/opt/openssl
brew install ccache
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 "$@" ..
make install
[ "$TEST" = "n" ] || ctest -C $TEST_TARGET -V
else
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
EXTRA_ARGS="--with-ssl-lib=/usr/local/Cellar/openssl/*/lib --with-ssl-headers=/usr/local/Cellar/openssl/*/include -with-boost=/usr/local/Cellar/boost/*"
fi
cd `dirname $0`/..
./bootstrap
./configure CC="ccache $CC" CXX="ccache $CXX" $EXTRA_ARGS "$@"
grep CXX config.status
make V=1
./runtest.pl ALL $TEST_TARGET
if [ "$TEST_TARGET" = "release" ]; then
make
make parcels
fi
fi
ccache -s