From 597f79538fceaaa3e1044958b5e53db7d24750ba Mon Sep 17 00:00:00 2001 From: Robert Stepanek Date: Wed, 22 Jan 2025 14:57:56 +0100 Subject: [PATCH] Makefile.am: enable compile warnings in CFLAGS This enables the "all" and "extra" warning diagnostics of the compiler and instructs it to treat any warning as compile error. Most of the current Cyrus IMAP maintainers have these flags enabled in their custom build scripts, but we now want to establish them as baseline for any builds. Tested with gcc version 12.2.0 and clang version 14.0.6. --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 1e67ca368d..e246695b72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,11 +41,15 @@ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # +WARN_CFLAGS = -Wall -Wextra -Werror +WARN_CPPFLAGS = -Wall -Wextra -Werror + ACLOCAL_AMFLAGS = -I cmulocal -AM_CFLAGS = @PERL_CCCDLFLAGS@ $(GCOV_CFLAGS) +AM_CFLAGS = $(WARN_CFLAGS) @PERL_CCCDLFLAGS@ $(GCOV_CFLAGS) AM_CXXFLAGS = $(GCOV_CXXFLAGS) AM_CPPFLAGS = \ + $(WARN_CPPFLAGS) \ $(COM_ERR_CPPFLAGS) \ -I${top_builddir} \ -I${top_builddir}/lib \