1 2# Build the code for test coverage analysis 3# jhrg 11/17/20 4 5.PHONY: coverage 6 7if ENABLE_COVERAGE 8AM_CXXFLAGS += --coverage -pg 9AM_LDFLAGS += --coverage -pg 10 11# gcov options for gcc/++ 12# -i (write .gcov files), -f (function summaries), -r (relative paths 13# only - i.e., elide system functions), -m (demangle names) 14# 15# for the llvm compiler, gcov is called without any options 16 17# GCOV_FLAGS is set by configure based on the kind of compiler 18 19# Removed: $(GCOV_FLAGS) .libs/*.o 20# @if test -n "$(coverage_subdirs)"; then \ 21# for d in $(coverage_subdirs); do \ 22# (cd $$d && $(MAKE) $(MFLAGS) coverage); \ 23# done; \ 24# fi 25 26coverage: 27 -gcovr -r . $(GCOVR_FLAGS) > gcovr_report.txt 28 29endif 30