Add coverage option to gcc
This commit is contained in:
parent
ee7f1d32f7
commit
493a9d7d8e
4 changed files with 19 additions and 4 deletions
|
@ -6,9 +6,9 @@ compiler:
|
|||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
env: CONFIGURE_OPTION='--enable-debug --with-malloc=jemalloc' COVERALLS=yes VALGRIND=no DEBUG=yes
|
||||
env: CONFIGURE_OPTION='--enable-debug --enable-gcov --with-malloc=jemalloc' COVERALLS=yes VALGRIND=no DEBUG=yes
|
||||
- compiler: gcc
|
||||
env: CONFIGURE_OPTION='--enable-debug' COVERALLS=yes VALGRIND=yes DEBUG=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
|
||||
env: CONFIGURE_OPTION='--enable-debug --enable-gcov' COVERALLS=yes VALGRIND=yes DEBUG=yes LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
|
||||
- compiler: clang
|
||||
env: ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/local/clang-3.4/bin/llvm-symbolizer CFLAGS='-fsanitize=address -g -O1'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ SUBDIRS=3rdparty src tests
|
|||
lib_LTLIBRARIES = libr3.la
|
||||
libr3_la_SOURCES =
|
||||
libr3_la_LIBADD = 3rdparty/libr3ext.la src/libr3core.la
|
||||
libr3_la_LDFLAGS = -static
|
||||
libr3_la_LDFLAGS =
|
||||
|
||||
AM_CFLAGS=$(DEPS_CFLAGS) $(GVC_DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/3rdparty -Wall -std=c99
|
||||
AM_LDFLAGS=$(DEPS_LIBS) $(GVC_DEPS_LIBS)
|
||||
|
|
|
@ -3,7 +3,7 @@ AC_PREREQ([2.64])
|
|||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
|
||||
LT_INIT
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_STDC
|
||||
|
@ -23,6 +23,13 @@ PKG_PROG_PKG_CONFIG
|
|||
|
||||
|
||||
|
||||
AC_ARG_ENABLE([gcov],
|
||||
[AS_HELP_STRING([--enable-gcov],
|
||||
[use Gcov to test the test suite])],
|
||||
[],
|
||||
[enable_gcov=no])
|
||||
AM_CONDITIONAL([COND_GCOV],[test '!' "$enable_gcov" = no])
|
||||
|
||||
|
||||
|
||||
AC_ARG_WITH([malloc],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
AM_CFLAGS=$(DEPS_CFLAGS) $(GVC_DEPS_CFLAGS) $(JSONC_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/3rdparty -Wall -std=c99
|
||||
AM_LDFLAGS=$(DEPS_LIBS) $(GVC_DEPS_LIBS) $(JSONC_LIBS)
|
||||
MAYBE_COVERAGE=--coverage
|
||||
|
||||
noinst_LTLIBRARIES = libr3core.la
|
||||
# lib_LIBRARIES = libr3.a
|
||||
|
@ -9,6 +10,13 @@ if ENABLE_JSON
|
|||
libr3core_la_SOURCES += json.c
|
||||
endif
|
||||
|
||||
if COND_GCOV
|
||||
# MAYBE_COVERAGE=--coverage --no-inline
|
||||
AM_CFLAGS += $(MAYBE_COVERAGE)
|
||||
endif
|
||||
|
||||
MOSTLYCLEANFILES = *.gcov *.gcda *.gcno
|
||||
|
||||
|
||||
|
||||
# libr3_la_LDFLAGS = -export-symbols-regex '^r3_|^match_'
|
||||
|
|
Loading…
Reference in a new issue