Skip to content

Commit

Permalink
feat(build): add -Wextra to "picky" compiler flags
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Sielicki <nslick@amazon.com>

stack-info: PR: #588, branch: aws-nslick/stack/30
  • Loading branch information
aws-nslick committed Sep 12, 2024
1 parent 7c86788 commit 4c7afdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ AC_DEFINE_UNQUOTED([OFI_NCCL_TRACE], [${trace}], [Defined to 1 unit test output
AC_ARG_ENABLE([picky-compiler],
[AS_HELP_STRING([--disable-picky-compiler], [Disable adding picky compiler flags.])])
AS_IF([test "${enable_picky_compiler}" != "no"],
[picky_compiler_flags="-Wall -Wc++-compat"
[picky_compiler_flags="-Wall -Wc++-compat -Wextra -Wno-unused-parameter"
AC_MSG_NOTICE([Adding ${picky_compiler_flags} to CFLAGS.])
CFLAGS="${CFLAGS} ${picky_compiler_flags}"
AS_UNSET([picky_compiler_flags])])

AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror], [Enable setting -Werror. Off by default, unless building from Git tree.])])
werror_flags="-Werror"
werror_flags="-Werror -Wno-error=unused-parameter -Wno-error=missing-field-initializers"
AS_IF([test -d "${srcdir}/.git" -a -z "${enable_werror}"],
[AC_MSG_NOTICE([Found .git directory. Adding ${werror_flags} to CFLAGS.])
CFLAGS="${CFLAGS} ${werror_flags}"],
Expand Down

0 comments on commit 4c7afdf

Please sign in to comment.