Autoconf, CMake: Add a warning flag (-Wundef)

This commit is contained in:
Francois-Xavier Le Bail 2024-03-06 21:21:00 +01:00 committed by fxlb
parent bfc96b0483
commit 656bd18c72
2 changed files with 2 additions and 0 deletions

View File

@ -1023,6 +1023,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel)
check_and_add_compiler_option(-Wshadow)
check_and_add_compiler_option(-Wsign-compare)
check_and_add_compiler_option(-Wstrict-prototypes)
check_and_add_compiler_option(-Wundef)
check_and_add_compiler_option(-Wunreachable-code-return)
check_and_add_compiler_option(-Wused-but-marked-unused)
check_and_add_compiler_option(-Wwrite-strings)

1
aclocal.m4 vendored
View File

@ -762,6 +762,7 @@ AC_DEFUN(AC_LBL_DEVEL,
AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow)
AC_LBL_CHECK_COMPILER_OPT($1, -Wsign-compare)
AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
AC_LBL_CHECK_COMPILER_OPT($1, -Wundef)
AC_LBL_CHECK_COMPILER_OPT($1, -Wunreachable-code-return)
AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-parameter)
AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-variable)