Commit 7ce8b85b authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

option --disable-warning-as-errors to the .configure script to make opam...

 option --disable-warning-as-errors to the .configure script to make opam compile without the -warn-error A option
parent 2874257c
......@@ -164,18 +164,8 @@ AC_MSG_RESULT(Bolt log level is $BOLT_LEVEL.)
AC_ARG_ENABLE(
[warning-as-errors],
[AS_HELP_STRING([--disable-warning-as-errors], [Disable dealing with compilation warnings as errors])],
[with_log=$enableval],
[with_log=no])
if test "$with_log" = "no" ; then
AC_SUBST(WARNINGS_AS_ERRORS,yes)
else
AC_SUBST(WARNINGS_AS_ERRORS,no)
fi
case "$WARNINGS_AS_ERRORS" in
yes) AC_MSG_RESULT(Compilation warnings considered as errors.);;
*) AC_MSG_RESULT(Compilation warnings not considered as errors.);;
esac
[AC_MSG_RESULT(Compilation warnings not considered as errors.);WARN_ERROR=""],
[AC_MSG_RESULT(Compilation warnings considered as errors.);WARN_ERROR="-warn-error A"])
# Look for ANSITerminal with ocamlfind
......@@ -290,6 +280,9 @@ AC_SUBST(OCAMLYACC)
AC_SUBST(TYPES)
AC_SUBST(WARN_ERROR)
AC_SUBST(OCAML09WARNINGS)
AC_SUBST(OCAMLP4_LOC)
......
......@@ -589,6 +589,7 @@ LIBOBJS
SET_MAKE
OCAMLP4_LOC
OCAML09WARNINGS
WARN_ERROR
TYPES
CAMLP4_LIB
OCF_INCLUDE
......@@ -601,7 +602,6 @@ OCamlCairo2_INCLUDE
OCamlCairo2_PATH
ANSITerminal_INCLUDE
ANSITerminal_PATH
WARNINGS_AS_ERRORS
BOLT_LEVEL
BOLT_PP
BOLT_LIB
......@@ -2908,25 +2908,13 @@ $as_echo "Bolt log level is $BOLT_LEVEL." >&6; }
# Check whether --enable-warning-as-errors was given.
if test "${enable_warning_as_errors+set}" = set; then :
enableval=$enable_warning_as_errors; with_log=$enableval
enableval=$enable_warning_as_errors; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings not considered as errors." >&5
$as_echo "Compilation warnings not considered as errors." >&6; };WARN_ERROR=""
else
with_log=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings considered as errors." >&5
$as_echo "Compilation warnings considered as errors." >&6; };WARN_ERROR="-warn-error A"
fi
if test "$with_log" = "no" ; then
WARNINGS_AS_ERRORS=yes
else
WARNINGS_AS_ERRORS=no
fi
case "$WARNINGS_AS_ERRORS" in
yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings considered as errors." >&5
$as_echo "Compilation warnings considered as errors." >&6; };;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings not considered as errors." >&5
$as_echo "Compilation warnings not considered as errors." >&6; };;
esac
# Look for ANSITerminal with ocamlfind
......@@ -4052,6 +4040,9 @@ $as_echo "$OCAMLP4 calls will be done with the $CAMLP4_LIB library" >&6; }
ac_config_files="$ac_config_files ./Makefile config/Makefile src/Makefile.master src/Makefile.common src/Makefile src/utils/Makefile src/logic/Makefile src/grammars/Makefile src/acg-data/Makefile src/scripting/Makefile src/datalog.prover/Makefile src/datalog.solver/Makefile"
......
......@@ -22,12 +22,12 @@ OCAMLCPOPT = -p fm
# Remove warnings:
# 58: Missing cmx file
DISABLE_WARNINGS=-58
DISABLED_WARNINGS=-58
# All warnings are treated as errors
WARNINGS = @OCAML09WARNINGS@ -w $(DISABLE_WARNINGS) -warn-error A
WARNINGS = @OCAML09WARNINGS@ -w $(DISABLED_WARNINGS) @WARN_ERROR@
COMMONFLAGS= $(WARNINGS) @TYPES@
BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG)
OPTFLAGS = $(COMMONFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment