mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 11:08:51 +02:00
Enable -Wall -Wextra for all Linux runners
With some exceptions.
This commit is contained in:
parent
0b57e9a30c
commit
05d933c18d
16
.github/workflows/linux.bash
vendored
16
.github/workflows/linux.bash
vendored
@ -5,6 +5,11 @@ export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/lib64/ccache:$PATH"
|
||||
export CCACHE_DIR=/icinga2/ccache
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
CMAKE_OPTS=()
|
||||
# -Wstringop-overflow is notorious for false positives and has been a problem for years.
|
||||
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
|
||||
# -Wtemplate-id-cdtor leaks from using the generated headers. We should reenable this once
|
||||
# we're considering moving to C++20 and/or the -ti.hpp files are generated differently.
|
||||
WARN_FLAGS="-Wall -Wextra -Wno-template-id-cdtor -Wno-stringop-overflow"
|
||||
|
||||
case "$DISTRO" in
|
||||
alpine:*)
|
||||
@ -79,14 +84,21 @@ esac
|
||||
|
||||
case "$DISTRO" in
|
||||
alpine:*)
|
||||
CMAKE_OPTS+=(-DUSE_SYSTEMD=OFF -DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF)
|
||||
CMAKE_OPTS+=(
|
||||
-DUSE_SYSTEMD=OFF
|
||||
-DICINGA2_WITH_MYSQL=OFF
|
||||
-DICINGA2_WITH_PGSQL=OFF
|
||||
-DCMAKE_{C,CXX}_FLAGS="${WARN_FLAGS}"
|
||||
)
|
||||
;;
|
||||
debian:*|ubuntu:*)
|
||||
CMAKE_OPTS+=(-DICINGA2_LTO_BUILD=ON)
|
||||
source <(dpkg-buildflags --export=sh)
|
||||
export CFLAGS="${CFLAGS} ${WARN_FLAGS}"
|
||||
export CXXFLAGS="${CXXFLAGS} ${WARN_FLAGS}"
|
||||
;;
|
||||
*)
|
||||
CMAKE_OPTS+=(-DCMAKE_{C,CXX}_FLAGS="$(rpm -E '%{optflags} %{?march_flag}')")
|
||||
CMAKE_OPTS+=(-DCMAKE_{C,CXX}_FLAGS="$(rpm -E '%{optflags} %{?march_flag}') ${WARN_FLAGS}")
|
||||
export LDFLAGS="$(rpm -E '%{?build_ldflags}')"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user