Skip to content

Commit

Permalink
Don't build with -Werror by default
Browse files Browse the repository at this point in the history
This is annoying and wrong for releases and distro packages. Explicitly
enable it for CI instead.
  • Loading branch information
martinpitt committed Sep 14, 2021
1 parent b2d99b7 commit 8ee7fd9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
project('umockdev', 'c', 'vala',
version: run_command('sed', '-rn', '1 { s/^.*\[([0-9.]+)\].*/\\1/; p }', 'NEWS').stdout().strip(),
license: 'LGPLv2.1+',
default_options: ['werror=true'])
license: 'LGPLv2.1+')

srcdir = meson.current_source_dir() / 'src'
testsdir = meson.current_source_dir() / 'tests'
Expand Down
2 changes: 1 addition & 1 deletion tests/run-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apk add --no-cache meson gcc musl-dev glib-dev eudev-dev libpcap-dev make vala l
su -s /bin/sh - guest << EOG
set -ex
cd /source
meson setup /tmp/dbg --buildtype debug
meson setup /tmp/dbg --buildtype debug --werror
meson test -C /tmp/dbg -v --num-processes=1
DESTDIR=/tmp/inst meson install -C /tmp/dbg
echo "===== tests done; install tree: ===="
Expand Down
4 changes: 2 additions & 2 deletions tests/run-apt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ useradd build
su -s /bin/sh - build << EOG
set -ex
cd /source
meson setup /tmp/dbg --buildtype debug --prefix /usr -Dgtk_doc=true
meson setup /tmp/dbg --buildtype debug --prefix /usr -Dgtk_doc=true --werror
cd /tmp/dbg
if meson dist --help | grep -q no-tests; then
meson dist --no-test
Expand All @@ -61,7 +61,7 @@ fi
su - build <<EOG
set -ex
cd /source
meson setup /tmp/rel --buildtype release -Db_ndebug=true --prefix /usr -Dgtk_doc=true
meson setup /tmp/rel --buildtype release -Db_ndebug=true --prefix /usr -Dgtk_doc=true --werror
meson test -C /tmp/rel -v --num-processes=1
EOG
Expand Down
4 changes: 2 additions & 2 deletions tests/run-dnf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ useradd guest
su -s /bin/sh - guest << EOG
set -eux
cd /source
meson setup /tmp/dbg --buildtype debug --prefix /usr -Dgtk_doc=\${gtk_doc} -Db_coverage=\$coverage
meson setup /tmp/dbg --buildtype debug --prefix /usr -Dgtk_doc=\${gtk_doc} -Db_coverage=\$coverage --werror
cd /tmp/dbg
DESTDIR=/tmp/inst meson install
meson test -v --num-processes=1
Expand All @@ -50,7 +50,7 @@ fi
# build with clang
cd /source
CC=clang meson setup /tmp/clang -Dgtk_doc=false
CC=clang meson setup /tmp/clang -Dgtk_doc=false --werror
meson test -C /tmp/clang -v --num-processes=1
EOG
Expand Down

0 comments on commit 8ee7fd9

Please sign in to comment.