2017-07-29 21:07:08 +02:00
|
|
|
#!/bin/bash -eu
|
2015-11-12 19:13:54 +01:00
|
|
|
|
2017-08-22 06:09:42 +02:00
|
|
|
: ${CHECK:=false}
|
|
|
|
: ${INTEGRATION:=true}
|
|
|
|
|
|
|
|
cmake --version
|
|
|
|
|
|
|
|
CFG=$*
|
|
|
|
if [[ "$CHECK" == "true" ]]; then
|
|
|
|
CFG="-DLINT=ON $CFG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if uname -s | grep -q Darwin; then
|
|
|
|
CFG="-DENABLE_NLS=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl $CFG"
|
|
|
|
fi
|
2015-11-12 19:13:54 +01:00
|
|
|
|
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
|
|
|
|
cmake .. ${CFG}
|
|
|
|
make -j2
|
|
|
|
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".'
|