Makefile: Update coverage_functional

Note sure if this is the best way to do it, but it works?
This commit is contained in:
Krystine Sherwin 2024-09-05 11:43:31 +12:00
parent 5a476a8d29
commit 21494d1f06
No known key found for this signature in database
1 changed files with 5 additions and 4 deletions

View File

@ -1052,11 +1052,12 @@ coverage:
clean_coverage:
find . -name "*.gcda" -type f -delete
FUNC_KERNEL := functional.cc functional.h sexpr.cc sexpr.h compute_graph.h
FUNC_INCLUDES := $(addprefix --include *,functional/* $(FUNC_KERNEL))
coverage_functional:
rm -rf coverage.info coverage2.info coverage_html
lcov --capture -d backends/functional --no-external -o coverage.info
lcov --capture -d kernel --include kernel/functional.cc --include kernel/functional.h --include kernel/sexpr.cc --include kernel/sexpr.h --include kernel/compute_graph.h --no-external -o coverage2.info
genhtml coverage.info coverage2.info --output-directory coverage_html
rm -rf coverage.info coverage_html
lcov --capture -d backends/functional -d kernel $(FUNC_INCLUDES) --no-external -o coverage.info
genhtml coverage.info --output-directory coverage_html
qtcreator:
echo "$(CXXFLAGS)" | grep -o '\-D[^ ]*' | tr ' ' '\n' | sed 's/-D/#define /' | sed 's/=/ /'> qtcreator.config