summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-08 13:42:16 +0100
committerThomas Haller <thaller@redhat.com>2019-02-08 20:14:50 +0100
commit53aac0233cebe6d41cc03adf356009c83365d74d (patch)
tree987d67a52d02594c3630a8299b989fdce6001d14
parentff5944ce03ae72a81318c0d8a55cca3c25b284a6 (diff)
downloadNetworkManager-53aac0233cebe6d41cc03adf356009c83365d74d.tar.gz
build/ci: enable --werror for meson builds
This enables -Werror for meson builds on gitlab-ci and semaphore. Not on Travis, the compiler there is too old, giving too many bogus warnings. This reverts commit 928d68d04af20808f801f05f92ad83179d7b826e ("m4: disable -Wmissing-braces for newer clang").
-rwxr-xr-xcontrib/scripts/nm-ci-run.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh
index c3d0cb2e54..7072933677 100755
--- a/contrib/scripts/nm-ci-run.sh
+++ b/contrib/scripts/nm-ci-run.sh
@@ -45,13 +45,13 @@ else
fi
_WITH_CRYPTO="gnutls"
-_WITH_MORE_WARNINGS="error"
+_WITH_WERROR=1
_WITH_LIBTEAM="$_TRUE"
_WITH_DOCS="$_TRUE"
_WITH_SYSTEMD_LOGIND="$_TRUE"
if [ "$CI" == travis ]; then
- _WITH_MORE_WARNINGS="no"
+ _WITH_WERROR=0
_WITH_LIBTEAM="$_FALSE"
_WITH_DOCS="$_FALSE"
_WITH_SYSTEMD_LOGIND="$_FALSE"
@@ -83,13 +83,18 @@ _autotools_test_print_logs() {
run_autotools() {
NOCONFIGURE=1 ./autogen.sh
mkdir ./build
+ if [ "$_WITH_WERROR" == 1 ]; then
+ _WITH_WERROR_VAL="error"
+ else
+ _WITH_WERROR_VAL="yes"
+ fi
pushd ./build
../configure \
--prefix="$PWD/INST" \
--enable-introspection=$_WITH_DOCS \
--enable-gtk-doc=$_WITH_DOCS \
--with-systemd-logind=$_WITH_SYSTEMD_LOGIND \
- --enable-more-warnings=$_WITH_MORE_WARNINGS \
+ --enable-more-warnings="$_WITH_WERROR_VAL" \
--enable-tests=yes \
--with-crypto=$_WITH_CRYPTO \
\
@@ -139,8 +144,16 @@ run_autotools() {
###############################################################################
run_meson() {
+ if [ "$_WITH_WERROR" == 1 ]; then
+ _WITH_WERROR_VAL="--werror"
+ else
+ _WITH_WERROR_VAL=""
+ fi
meson build \
\
+ --warnlevel 2 \
+ $_WITH_WERROR_VAL \
+ \
-D ld_gc=false \
-D session_tracking=no \
-D systemdsystemunitdir=no \