aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Safr <miroslav.safr@tieto.com>2010-10-18 09:58:26 +0300
committerMiroslav Safr <miroslav.safr@tieto.com>2010-10-22 11:32:31 +0300
commitede454bfbc50d11a378b2f9805a178cfe91df354 (patch)
tree7479823fd275f6a08f29a36f7e71fd9799c1f931
parentcd6b069653f5d16a7f8b9bd05d2e1a0fd960752e (diff)
Changes: Coverage reports: Added environment check to configure for -coverage build, cleaning
-rwxr-xr-xconfigure17
-rw-r--r--mkspecs/common.pri3
-rw-r--r--src/common_top.pri5
3 files changed, 19 insertions, 6 deletions
diff --git a/configure b/configure
index 782ffdf5..bc5cc5e3 100755
--- a/configure
+++ b/configure
@@ -552,6 +552,23 @@ if [ "$CFG_TIMESTAMPS" = "yes" ]; then
fi
if [ "$CFG_COVERAGE" = "yes" ]; then
+ which bcov > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "You specified -coverage but bcov was not found."
+ echo "Please install the bcov and lcov packages."
+ exit 1
+ fi
+ which lcov > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "You specified -coverage but lcov was not found."
+ echo "Please install the bcov and lcov packages."
+ exit 1
+ fi
+ if [ "$SBOX_USE_CCACHE" != "no" ]; then
+ echo "You specified -coverage so the SBOX_USE_CCACHE has to be set to \"no\"."
+ exit 1
+ fi
+
MEEGOTOUCHCONFIG_FEATURES="$MEEGOTOUCHCONFIG_FEATURES coverage"
fi
diff --git a/mkspecs/common.pri b/mkspecs/common.pri
index fe5ba299..ce5c6288 100644
--- a/mkspecs/common.pri
+++ b/mkspecs/common.pri
@@ -118,7 +118,8 @@ contains( M_BUILD_FEATURES, coverage ) {
QMAKE_CLEAN += \
*.gcda \
- *.gcno
+ *.gcno \
+ *.gcov
}
diff --git a/src/common_top.pri b/src/common_top.pri
index 92e583be..af332086 100644
--- a/src/common_top.pri
+++ b/src/common_top.pri
@@ -46,11 +46,6 @@ DEFINES += QT_STRICT_ITERATORS
## Features
-contains(M_BUILD_FEATURES, coverage) {
- QMAKE_CXXFLAGS += --coverage
- QMAKE_LFLAGS += --coverage
-}
-
contains(M_BUILD_FEATURES, timestamps) {
DEFINES += M_TIMESTAMP
}