Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changes: Coverage reports: coverage feature moved to CONFIG (.prf)
RevBy:
Details: Coverage feature can be now reused by other applications which are building with libmeegotouch.
         It is just enough to have "coverage" option in  CONFIG for projects which uses libmeegotouch
  • Loading branch information
Miroslav Safr committed Oct 22, 2010
1 parent ede454b commit d6f0b93
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -569,7 +569,7 @@ if [ "$CFG_COVERAGE" = "yes" ]; then
exit 1
fi

MEEGOTOUCHCONFIG_FEATURES="$MEEGOTOUCHCONFIG_FEATURES coverage"
MEEGOTOUCHCONFIG_CONFIG="$MEEGOTOUCHCONFIG_CONFIG coverage"
fi

if [ "$CFG_PCH" = "yes" ]; then
Expand Down
9 changes: 4 additions & 5 deletions mkspecs/common.pri
Expand Up @@ -112,17 +112,16 @@ contains(USE_CCACHE, "true") {
QMAKE_CXX = ccache g++
}

contains( M_BUILD_FEATURES, coverage ) {
QMAKE_CXXFLAGS += -ftest-coverage -fprofile-arcs
LIBS += -lgcov
contains( CONFIG, coverage ) {
QMAKE_CXXFLAGS *= -ftest-coverage -fprofile-arcs
LIBS *= -lgcov

QMAKE_CLEAN += \
QMAKE_CLEAN *= \
*.gcda \
*.gcno \
*.gcov
}


QMAKE_LIBDIR += $${M_BUILD_TREE}/lib

include(shared.pri)
10 changes: 10 additions & 0 deletions mkspecs/features/meegotouch_common.prf
Expand Up @@ -34,3 +34,13 @@ contains(TEMPLATE, app) {
}
LIBS += -L$${M_LIB_DIR}
}

contains( CONFIG, coverage ) {
QMAKE_CXXFLAGS *= -ftest-coverage -fprofile-arcs
LIBS *= -lgcov

QMAKE_CLEAN *= \
*.gcda \
*.gcno \
*.gcov
}
2 changes: 1 addition & 1 deletion tests/common_bot.pri
@@ -1,4 +1,4 @@
DEPENDS=
contains( M_BUILD_FEATURES, coverage ) {
contains( CONFIG, coverage ) {
include(coverage.pri)
}
2 changes: 1 addition & 1 deletion tests/coverage.pri
Expand Up @@ -19,7 +19,7 @@ coverage-xml.depends = check-xml
coverage-xml.commands = @../coverage.py $$srcList($$TEST_SOURCES) .obj 90


QMAKE_CLEAN += *.gcda *.gcno *.gcov *.log
QMAKE_CLEAN += *.log
#there are some xml files used in testing
#*.xml
QMAKE_DISTCLEAN += *.gcda *.gcno *.gcov *.log
Expand Down

0 comments on commit d6f0b93

Please sign in to comment.