From 6a56b171b6c4a8bdc3db47ce5b9627db68ac468b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 11 Dec 2013 11:01:25 +0200 Subject: build: Add coverage support Coverage is enabled with --enable-maintainer-mode, 2 new targets are added 'coverage' and 'clean-coverage', the first generate the reports using lcov and depend on the second to cleanup previous generated reports and .gcda files. --- acinclude.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 4c241bf0b..4cfc80a0d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -52,6 +52,10 @@ AC_DEFUN([MISC_FLAGS], [ misc_ldflags="$misc_ldflags -pie" fi ]) + if (test "$USE_MAINTAINER_MODE" = "yes"); then + misc_cflags="$misc_cflags --coverage" + misc_ldflags="$misc_ldflags --coverage" + fi AC_SUBST([MISC_CFLAGS], $misc_cflags) AC_SUBST([MISC_LDFLAGS], $misc_ldflags) ]) -- cgit v1.2.1