Remove warnings-as-errors by default

Compiling C++ on various different platforms with as many out of tree
dependencies as we have is volatile at best.
In order to prevent a third party warning from ruining the build for
people who don't care about third party warnings, we remove
warnings-as-errors by default.
They are still enabled by default on CI.
This commit is contained in:
Vasily Utkin
2021-01-01 23:28:19 +01:00
committed by username223
parent 44a5d3eed0
commit 5a7fe687d8
9 changed files with 45 additions and 34 deletions
+17 -2
View File
@@ -1,15 +1,30 @@
#!/usr/bin/env bash
set -e
QMAKE_SPEC='linux-g++'
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PROJECT_DIR=$SCRIPT_DIR/../../
BUILD_DIR=$PROJECT_DIR/build/
. $SCRIPT_DIR/configure.sh
if [[ -z $USE_TIDY ]]; then
MAKE_COMMAND="make --jobs ${MAKE_JOBS}"
CLANG_TIDY=
else
# Bear replaces the compile database, it does not update it.
# If you run 'bear make' and there is nothing to compile, you
# will get an empty database.
# Clean up the artifacts and run everything together in that case.
MAKE_COMMAND='bear make --jobs'
QMAKE_SPEC='linux-clang'
CLANG_TIDY="$SCRIPT_DIR/run-clang-tidy.sh"
fi
echo $MAKE_COMMAND
mkdir -p $BUILD_DIR
cd $BUILD_DIR
qmake --version
qmake -spec $QMAKE_SPEC $PROJECT_DIR $QMAKE_EXTRAS
qmake -spec $QMAKE_SPEC $PROJECT_DIR CONFIG+=warnings_as_errors
$MAKE_COMMAND
$CLANG_TIDY