Coverage in admin/
George Staikos
staikos at kde.org
Wed Dec 1 22:25:40 GMT 2004
Could we add something like this to admin/ to make gcov coverage testing a bit
easier? (read: does anyone object?) I'm using this in kst right now on both
gcc2.95 and gcc 3.3 and it works well for me.
Maybe my code isn't quite perfect, but you get the idea...
AC_ARG_WITH(coverage,
AC_HELP_STRING([--with-coverage],[use gcc coverage testing]),
[
if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
ac_coverage_compiler="-g3 -fprofile-arcs -ftest-coverage -O0
-fno-inline"
ac_coverage_linker="-lgcc"
elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
ac_coverage_compiler="-g3 -fprofile-arcs -ftest-coverage -O0
-fno-inline"
ac_coverage_linker=""
else
AC_MSG_ERROR([coverage with your compiler is not supported])
fi
CFLAGS="$CFLAGS $ac_coverage_compiler"
CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
LDFLAGS="$LDFLAGS $ac_coverage_linker"
])
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the kde-core-devel
mailing list