# 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