2017-07-29 21:07:08 +02:00
|
|
|
#!/bin/bash -eu
|
2015-11-12 19:13:54 +01:00
|
|
|
|
2017-08-26 08:00:11 +02:00
|
|
|
: ${CMAKE:=cmake}
|
2017-08-22 06:09:42 +02:00
|
|
|
: ${CHECK:=false}
|
|
|
|
: ${INTEGRATION:=true}
|
|
|
|
|
2017-08-26 08:00:11 +02:00
|
|
|
${CMAKE} --version
|
2017-08-22 06:09:42 +02:00
|
|
|
|
|
|
|
CFG=$*
|
|
|
|
if [[ "$CHECK" == "true" ]]; then
|
|
|
|
CFG="-DLINT=ON $CFG"
|
|
|
|
fi
|
|
|
|
|
2017-07-29 21:07:08 +02:00
|
|
|
if [[ ! -d build ]]
|
2015-11-12 19:13:54 +01:00
|
|
|
then
|
2017-08-22 06:09:42 +02:00
|
|
|
mkdir build
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd build
|
2017-08-26 08:00:11 +02:00
|
|
|
${CMAKE} .. ${CFG}
|
2017-08-22 06:09:42 +02:00
|
|
|
make -j2
|
2017-10-09 01:07:53 +02:00
|
|
|
make unittests
|
2017-08-22 06:09:42 +02:00
|
|
|
make test
|
|
|
|
if [[ "$INTEGRATION" == "true" ]]; then
|
|
|
|
make integration
|
2015-11-12 19:13:54 +01:00
|
|
|
fi
|
|
|
|
|
2017-08-22 06:09:42 +02:00
|
|
|
cd ..
|
2017-08-08 17:50:44 +02:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo 'Everything looks good, you can install via "make install -C build".'
|