mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-01 11:52:57 +01:00
Problem: no code coverage integration
Solution: import ax_code_coverage.m4 from autoconf-archive and use it in configure.ac and Makefile.am in order to provide a make check-code-coverage target behind a --enable-code-coverage configure flag, that can be used to generate a gcov/lcov code coverage report. Depends on having gcov and lcov installed.
This commit is contained in:
@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(foreign subdir-objects tar-ustar dist-zip)
|
||||
m4_pattern_allow([AC_PROG_CC_C99])
|
||||
m4_include([m4/ax_check_compile_flag.m4])
|
||||
m4_include([m4/ax_cxx_compile_stdcxx_11.m4])
|
||||
m4_include([m4/ax_code_coverage.m4])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# This lets us use PACKAGE_VERSION in Makefiles
|
||||
@@ -50,6 +51,7 @@ AC_PROG_CC
|
||||
AX_CHECK_COMPILE_FLAG([-std=gnu11], [CFLAGS+=" -std=gnu11"], [AC_PROG_CC_C99])
|
||||
AC_PROG_CXX
|
||||
AX_CXX_COMPILE_STDCXX_11([ext], [optional])
|
||||
AX_CODE_COVERAGE
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_SED
|
||||
AC_PROG_AWK
|
||||
|
||||
Reference in New Issue
Block a user