[Scummvm-git-logs] scummvm master -> 38545bbd3c91cc890c7db8b62ab609ee552f8f5c
bluegr
noreply at scummvm.org
Sat Aug 10 16:22:22 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
38545bbd3c CONFIGURE: Apply --enable-Werror after testing features and libraries
Commit: 38545bbd3c91cc890c7db8b62ab609ee552f8f5c
https://github.com/scummvm/scummvm/commit/38545bbd3c91cc890c7db8b62ab609ee552f8f5c
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-08-10T19:22:19+03:00
Commit Message:
CONFIGURE: Apply --enable-Werror after testing features and libraries
If -Werror is triggered too early in the configure script, some features
and libraries could end up being disabled, because some tests can produce
small warnings on some systems.
An example is the posix_spawn() test triggering a -Wnonnull warning on
modern Glibc systems. We could fix this test in particular, but we never
know what a future compiler upgrade will find in its new `-Wall` settings.
Just be safe and only enable -Werror when all features are done being
detected detected; --enable-Werror is meant for ScummVM's code itself,
not finding warning in system headers/components/libraries.
Changed paths:
configure
diff --git a/configure b/configure
index d9cbe65b239..3f777e8c5bc 100755
--- a/configure
+++ b/configure
@@ -185,6 +185,7 @@ _debug_build=auto
_release_build=auto
_optimizations=auto
_verbose_build=no
+_werror_build=no
_text_console=no
_mt32emu=yes
_lua=yes
@@ -1474,7 +1475,7 @@ for ac_option in $@; do
_debug_build=no
;;
--enable-Werror)
- append_var CXXFLAGS "-Werror"
+ _werror_build=yes
;;
--enable-release-mode)
_release_build=yes
@@ -7310,6 +7311,13 @@ case $_host_os in
esac
+if test "$_werror_build" = yes; then
+ # --enable-Werror shouldn't be applied before being done testing all system
+ # features and libraries. Otherwise, some of them could just end up being silently
+ # disabled, when any small warning appears in a test.
+ append_var CXXFLAGS "-Werror"
+fi
+
#
# Engine selection
#
More information about the Scummvm-git-logs
mailing list