Skip to content

Commit

Permalink
Makefile.am: enable compile warnings in CFLAGS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rsto committed Jan 22, 2025
1 parent 025c3ff commit 597f795
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 597f795

Please sign in to comment.