View Full Version : qmake and gcov?
akos.maroy
15th August 2008, 11:06
I wonder if anyone has set up a gcov code coverage analysis setup using qmake. I'd be interested in the details :)
jpn
15th August 2008, 15:00
This is a bit hackish but works :)
################################################## ####################
# make coverage (debug)
################################################## ####################
coverage.CONFIG += recursive
QMAKE_EXTRA_TARGETS += coverage
CONFIG(debug,debug|release) {
QMAKE_EXTRA_TARGETS += cov_cxxflags cov_lflags
cov_cxxflags.target = coverage
cov_cxxflags.depends = CXXFLAGS += -fprofile-arcs -ftest-coverage
cov_lflags.target = coverage
cov_lflags.depends = LFLAGS += -fprofile-arcs -ftest-coverage
coverage.commands = @echo "Built with coverage support..."
build_pass|!debug_and_release:coverage.depends = all
QMAKE_CLEAN += $(OBJECTS_DIR)/*.gcda $(OBJECTS_DIR)/*.gcno
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.