From b28aee2679692111c14e9c65f81a8a1054fb2c17 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 8 Mar 2022 09:39:39 +0100 Subject: [PATCH] allow CI script to create release builds --- .travis.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.sh b/.travis.sh index 8fd7588b..ffe56f3e 100755 --- a/.travis.sh +++ b/.travis.sh @@ -1,5 +1,6 @@ #!/bin/sh -if [ "$ANALYZE" = "true" ] ; then +if [ "$ANALYZE" = "true" ] +then cppcheck --error-exitcode=1 -j2 -DRANGECHECK -ISource Source toolsrc 2> stderr.txt RET=$? if [ -s stderr.txt ] @@ -9,9 +10,14 @@ if [ "$ANALYZE" = "true" ] ; then exit $RET else set -e + export VERBOSE=1 rm -rf build/ CMakeCache.txt CMakeFiles/ mkdir build && cd build - cmake -G "Ninja" "$CROSSRULE" .. -DENABLE_WERROR=ON + if [ -n "$RELEASE" ] + then + BUILD_TYPE="-DCMAKE_BUILD_TYPE=Release" + fi + cmake -G "Ninja" "$BUILD_TYPE" "$CROSSRULE" .. -DENABLE_WERROR=ON ninja -v DESTDIR=/tmp/whatever ninja -v install/strip ninja -v package