osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41025?usp=email )

 (

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: configure: add --enable-werror, --enable-sanitize
......................................................................

configure: add --enable-werror, --enable-sanitize

Change-Id: I089b72068c095b9c88eb72970a9e691da3673ddf
---
M configure.ac
1 file changed, 26 insertions(+), 0 deletions(-)

Approvals:
  osmith: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, approved




diff --git a/configure.ac b/configure.ac
index fc359c2..f6db329 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,32 @@
 CFLAGS="$saved_CFLAGS"
 AC_SUBST(SYMBOL_VISIBILITY)

+AC_ARG_ENABLE(sanitize,
+       [AS_HELP_STRING(
+               [--enable-sanitize],
+               [Compile with address sanitizer enabled],
+       )],
+       [sanitize=$enableval], [sanitize="no"])
+if test x"$sanitize" = x"yes"
+then
+       CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
+       CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+fi
+
+AC_ARG_ENABLE(werror,
+       [AS_HELP_STRING(
+               [--enable-werror],
+               [Turn all compiler warnings into errors]
+       )],
+       [werror=$enableval], [werror="no"])
+if test x"$werror" = x"yes"
+then
+       WERROR_FLAGS="-Werror"
+       WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion 
-Werror=old-style-definition"
+       CFLAGS="$CFLAGS $WERROR_FLAGS"
+       CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
+fi
+
 AC_OUTPUT(
         libosmo-asn1-tcap.pc
         src/Makefile

--
To view, visit https://gerrit.osmocom.org/c/libosmo-asn1-tcap/+/41025?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: libosmo-asn1-tcap
Gerrit-Branch: master
Gerrit-Change-Id: I089b72068c095b9c88eb72970a9e691da3673ddf
Gerrit-Change-Number: 41025
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to