[build] Add option to enable gcov data generation

Nice to be able to check how good the tests are (or aren't, as the case
may be).
This commit is contained in:
Bill Currie 2021-03-07 17:39:22 +09:00
parent 4a97bc3ba5
commit 14bc560624

View file

@ -223,6 +223,12 @@ QF_CC_OPTION(-Wsuggest-attribute=const)
QF_CC_OPTION(-Wsuggest-attribute=noreturn)
QF_CC_OPTION(-Wsuggest-attribute=format)
AC_ARG_ENABLE(coverage,
[ --enable-coverage Enable generation of data for gcov])
if test "x$enable_coverage" = xyes; then
QF_CC_OPTION(-fprofile-arcs -ftest-coverage)
fi
dnl QuakeForge uses lots of BCPL-style (//) comments, which can cause problems
dnl with many compilers that do not support the latest ISO standards. Well,
dnl that is our cover story -- the reality is that we like them and do not want
@ -250,8 +256,7 @@ if test "x$GCC" != xyes; then
fi
AC_ARG_ENABLE(Werror,
[ --disable-Werror Do not treat warnings as errors]
)
[ --disable-Werror Do not treat warnings as errors])
dnl We want warnings, lots of warnings...
dnl The help text should be INVERTED before release!
dnl when in git, this test defaults to ENABLED.