From 332ed569a36eb3ee345772f8872cdc77405e0bbb 2012-04-24 09:00:31 From: Michal Klocek Date: 2012-04-24 09:00:31 Subject: [PATCH] minor. add debug flag for coverage --- diff --git a/charts.pro b/charts.pro index e8d7b22..63268ca 100644 --- a/charts.pro +++ b/charts.pro @@ -37,13 +37,11 @@ win32:{ docs.depends = FORCE QMAKE_EXTRA_TARGETS += docs -coverage:{ - - CONFIG+=debug +unix:coverage:{ QMAKE_DISTCLEAN += -r ./coverage QMAKE_CLEAN += build/*.gcda build/*.gcno QMAKE_EXTRA_TARGETS += buildcoverage runcoverage gencoverage - + buildcoverage.target = build_coverage buildcoverage.depends = all buildcoverage.commands = mkdir -p ./coverage; \ diff --git a/config.pri b/config.pri index 4f6251d..c14192e 100644 --- a/config.pri +++ b/config.pri @@ -1,5 +1,6 @@ LIBRARY_NAME = QtCommercialChart +coverage: CONFIG+=debug ##################### SHADOW CONFIG ################################################# @@ -107,3 +108,4 @@ CONFIG(debug, debug|release) { CONFIG+=test_private DEFINES+=BUILD_PRIVATE_UNIT_TESTS } + diff --git a/src/src.pro b/src/src.pro index 6be657a..5dfd961 100644 --- a/src/src.pro +++ b/src/src.pro @@ -210,13 +210,12 @@ win32:QMAKE_DISTCLEAN += /Q \ ############################## COVERAGE ######################################### -coverage:{ +unix:coverage:{ QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage LIBS += -lgcov -CONFIG += debug QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info QMAKE_EXTRA_TARGETS += preparecoverage gencoverage