aboutsummaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-03 19:58:20 +0000
committerEric Christopher <echristo@apple.com>2012-08-03 19:58:20 +0000
commit09a887345f283f3ffb46a36e78ca761026ab0cf2 (patch)
tree7cb61bb2de2c7b9373ba1ed6fc08deb4849a0496 /autoconf
parent46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f (diff)
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
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 413a1eefe6..4d3a14efd4 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")