From 09a887345f283f3ffb46a36e78ca761026ab0cf2 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 3 Aug 2012 19:58:20 +0000 Subject: Add a configure flag for enabling -Werror on the command line while building as requested by Lang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161253 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'autoconf') diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 413a1ee..4d3a14e 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -502,6 +502,16 @@ else AC_SUBST(DISABLE_ASSERTIONS,[[DISABLE_ASSERTIONS=1]]) fi +dnl --enable-werror : check whether we want Werror on by default +AC_ARG_ENABLE(werror,AS_HELP_STRING( + --enable-werror,[Compile with -Werror enabled (default is NO)]),, enableval="no") +case "$enableval" in + yes) AC_SUBST(ENABLE_WERROR,[1]) ;; + no) AC_SUBST(ENABLE_WERROR,[0]) ;; + default) AC_SUBST(ENABLE_WERROR,[0]);; + *) AC_MSG_ERROR([Invalid setting for --enable-werror. Use "yes" or "no"]) ;; +esac + dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks: AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING( --enable-expensive-checks,[Compile with expensive debug checks enabled (default is NO)]),, enableval="no") -- cgit v1.1