summaryrefslogtreecommitdiff
path: root/m4/compiler.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/compiler.m4')
-rw-r--r--m4/compiler.m47
1 files changed, 7 insertions, 0 deletions
diff --git a/m4/compiler.m4 b/m4/compiler.m4
index b180044e14a..69fad056a10 100644
--- a/m4/compiler.m4
+++ b/m4/compiler.m4
@@ -44,6 +44,11 @@ AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl
dnl CXXFLAGS to allow the user override them.
dnl DCXXFLAGS - C++ debugging flags
dnl OCXXFLAGS - C++ optimization flags
+ dnl WERROR - Compiler flag that converts warnings to errors
+
+ if test -n "$GXX"; then
+ WERROR="-Werror"
+ fi
case "$target" in
*aix4.2* | *aix4.3*)
@@ -182,6 +187,8 @@ AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl
*solaris2*)
case "$CXX" in
CC)
+ WERROR="-xwe"
+
if test "$ace_user_enable_exceptions" != yes; then
CXXFLAGS="$CXXFLAGS -noex"
fi