blob: b642b4a9993a3690b6fb8f0e68bb29f9cd2dee12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# generate code coverage information using gcov/lcov/genhtml
CONFIG(debug,debug|release) {
equals(TEMPLATE, "subdirs") {
sub-coverage.target = coverage
sub-coverage.CONFIG = recursive
QMAKE_EXTRA_TARGETS += sub-coverage
} else {
coverage_pre.commands += @echo && echo "Building with coverage support..." && echo $(eval CXXFLAGS += -O0 -fprofile-arcs -ftest-coverage)$(eval LFLAGS += -O0 -fprofile-arcs -ftest-coverage)
coverage.CONFIG += recursive
coverage.commands = @echo && echo "Finished building with coverage support." && echo
build_pass|!debug_and_release:coverage.depends = coverage_pre all
QMAKE_EXTRA_TARGETS *= coverage_pre coverage
}
}
QMAKE_CLEAN += $(OBJECTS_DIR)/*.gcda $(OBJECTS_DIR)/*.gcno $(TARGET).gcov-info
|