File: coverage.mk

package info (click to toggle)
libdap 3.20.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,568 kB
  • sloc: cpp: 50,809; sh: 41,536; xml: 23,511; ansic: 20,030; yacc: 2,508; exp: 1,544; makefile: 990; lex: 309; perl: 52; fortran: 8
file content (29 lines) | stat: -rw-r--r-- 687 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# Build the code for test coverage analysis
# jhrg 11/17/20

.PHONY: coverage

if ENABLE_COVERAGE
AM_CXXFLAGS += --coverage -pg
AM_LDFLAGS += --coverage -pg

# gcov options for gcc/++
# -i (write .gcov files), -f (function summaries), -r (relative paths
# only - i.e., elide system functions), -m (demangle names)
#
# for the llvm compiler, gcov is called without any options

# GCOV_FLAGS is set by configure based on the kind of compiler

# Removed: $(GCOV_FLAGS) .libs/*.o
# @if test -n "$(coverage_subdirs)"; then \
# 	for d in $(coverage_subdirs); do \
# 		(cd $$d && $(MAKE) $(MFLAGS) coverage); \
# 	done; \
# fi

coverage: 
	-gcovr -r . $(GCOVR_FLAGS) > gcovr_report.txt

endif