1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 18:49:50 +00:00

build: Add a code coverage option

Configure with:
  ./configure --enable-code-coverage
Show coverage output with:
  make code-coverage-capture

Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
to provide the macros to check for presence of gcov + lcov;
upstream macro modified to:
 - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
   autoconf (such as the one used by default on Travis) do not have this.
 - Rather than automatically defining CODE_COVERAGE_RULES to be a set
   of makefile rules that use ifeq/endif (which is GNU make-specific),
   instead only define CODE_COVERAGE_RULES if coverages is turned on,
   and in that case don't use conditionals in the makefile.
This commit is contained in:
David Drysdale
2015-09-29 10:07:18 +01:00
parent 7972adc5d7
commit 1b6905cc7f
4 changed files with 231 additions and 0 deletions

View File

@ -127,6 +127,10 @@ libcares_la_CFLAGS_EXTRA += $(CFLAG_CARES_SYMBOL_HIDING)
libcares_la_CPPFLAGS_EXTRA += -DCARES_SYMBOL_HIDING
endif
@CODE_COVERAGE_RULES@
libcares_la_LDFLAGS += $(CODE_COVERAGE_LDFLAGS)
libcares_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS)
libcares_la_CFLAGS = $(AM_CFLAGS) $(libcares_la_CFLAGS_EXTRA)
libcares_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcares_la_CPPFLAGS_EXTRA)