Added check target to qmake
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 3 Sep 2010 07:53:55 +0000 (09:53 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 3 Sep 2010 07:53:55 +0000 (09:53 +0200)
12 files changed:
mdictionary.pri
mdictionary.pro
src/desktopWidget/desktopWidget.pro
src/mdictionary/mdictionary.pro
src/plugins/google/google.pro
src/plugins/plugins.pro
src/plugins/xdxf/xdxf.pro
src/src.pro
tests/GooglePluginTests/tests.pro [deleted file]
tests/XdxfPluginTests/tests.pro [deleted file]
tests/mDictionaryTests/mDictionaryTests.pro
tests/tests.pro

index 2be5fbd..cdaf8f4 100644 (file)
@@ -1,3 +1,4 @@
+PROJECTNAME = mdictionary
 VERSION = 0.1
 
 QT = \
@@ -14,7 +15,7 @@ maemo5:QT += maemo5
 
 CONFIG += \
        qt \
-       release
+    release
 
 isEmpty(ENABLED_SRC):ENABLED_SRC = "mdictionary plugins desktopWidget"
 isEmpty(ENABLED_PLUGINS):ENABLED_PLUGINS = "xdxf google"
index f501bf2..4018128 100644 (file)
@@ -6,9 +6,12 @@ include (mdictionary.pri)
 
 check.CONFIG += recursive
 check.recurse = src tests
-check.depends = install
 QMAKE_EXTRA_TARGETS += check
 
+
+include(doc/doc.pri)
+QMAKE_EXTRA_TARGETS += doc
+
 message("Enabled sources: "$$ENABLED_SRC)
 message("Enabled plugins: "$$ENABLED_PLUGINS)
 
@@ -18,14 +21,3 @@ message("Data directory: "$$DATA_DIR)
 message("Plugins directory: "$$PLUGINS_DIR)
 message("Documentation directory: "$$DOCS_DIR)
 
-
-if(coverage) {
-        coverage-report.CONFIG = recursive
-        coverage-report.recurse = src
-        QMAKE_EXTRA_TARGETS += coverage-report
-        message('******************************************************************' )
-        message('* Remember to disable CCACHE in scratchbox to make Code Coverage' )
-        message('* report!' )
-        message('* use command: export SBOX_USE_CCACHE="no"' )
-        message('******************************************************************' )
-}
index dfa6b78..64820d8 100644 (file)
@@ -27,4 +27,5 @@ unix {
                        desktop
 }
 
-
+check.commands = echo 'No check here'
+QMAKE_EXTRA_TARGETS += check
index 00118ca..f0cf4bd 100644 (file)
@@ -85,19 +85,5 @@ unix {
 }
 
 
-
-coverage {
-        # add flags to compiler
-        LIBS += -lgcov
-        QMAKE_CXXFLAGS += -ftest-coverage -fprofile-arcs -fno-elide-constructors
-
-        # and add a target for generating report
-        QMAKE_EXTRA_TARGETS += coverage-report
-        coverage-report.commands  = lcov -d .obj --capture --output-file all.cov -b . &&
-        coverage-report.commands += lcov -r all.cov '*thumbtest*' -r all.cov '*/src/dbus/*' -r all.cov '*/src/.moc/*' -o to_test.cov &&
-        coverage-report.commands += lcov -e to_test.cov '*/*/src/*.cpp*' -e to_test.cov '*/*/src/*.h*' -e to_test.cov '*/*/src/common/*.h*' -o final.cov &&
-        coverage-report.commands += genhtml -o coverage final.cov
-}
-
 check.commands = echo 'No check here'
 QMAKE_EXTRA_TARGETS += check
index 3b39bc5..a7c7bd5 100644 (file)
@@ -21,3 +21,6 @@ HEADERS += \
 
 RESOURCES += \
     icons.qrc
+
+check.commands = echo 'No check here'
+QMAKE_EXTRA_TARGETS += check
index fca995c..14a3403 100644 (file)
@@ -2,3 +2,7 @@ include (plugins.pri)
 
 TEMPLATE = subdirs
 SUBDIRS = $$ENABLED_PLUGINS
+
+check.CONFIG = recursive
+check.recurse = $$ENABLED_PLUGINS
+QMAKE_EXTRA_TARGETS += check
index 91955f4..d7e0f6a 100644 (file)
@@ -35,3 +35,5 @@ unix {
   dicts.files += ../../../data/dicts/eng-thai.xdxf
 }
 
+check.commands = echo 'No check here'
+QMAKE_EXTRA_TARGETS += check
index 6c65bf4..90f8853 100644 (file)
@@ -1,4 +1,5 @@
 include(src.pri)
+include(../mdictionary.pri)
 
 TEMPLATE = subdirs
 SUBDIRS = $$ENABLED_SRC
@@ -7,8 +8,9 @@ check.CONFIG = recursive
 check.recurse = $$ENABLED_SRC
 QMAKE_EXTRA_TARGETS += check
 
-coverage {
-        # add flags to compiler
-        LIBS += -lgcov
-        QMAKE_CXXFLAGS += -ftest-coverage -fprofile-arcs -fno-elide-constructors
-}
+INSTALL_HEADERS = include/*
+install_headers.path = $$INSTALL_PREFIX/include/mdictionary
+install_headers.files = $$INSTALL_HEADERS
+
+INSTALLS += install_headers
+
diff --git a/tests/GooglePluginTests/tests.pro b/tests/GooglePluginTests/tests.pro
deleted file mode 100644 (file)
index 9c1092b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-######################################################################
-# Automatically generated by qmake (1.07a) Wed Aug 4 11:35:12 2010
-######################################################################
-
-CONFIG += qtestlib
-QT += core gui network
-TARGET = GooglePluginTests
-TEMPLATE = app
-INCLUDEPATH += .
-
-# Input
-HEADERS += test.h \
-    ../../src/plugins/google/GooglePlugin.h \
-    ../../src/common/translation.h \
-    ../../src/common/settings.h \
-    ../../src/common/DictDialog.h \
-    ../../src/common/CommonDictInterface.h \
-    ../../src/plugins/google/TranslationGoogle.h \
-    ../../src/plugins/google/GoogleDictDialog.h \
-    ../../src/plugins/google/GoogleSettingsDialog.h
-
-SOURCES += test.cpp \
-    ../../src/plugins/google/GooglePlugin.cpp \
-    ../../src/plugins/google/TranslationGoogle.cpp \
-    ../../src/plugins/google/GoogleDictDialog.cpp \
-    ../../src/plugins/google/GoogleSettingsDialog.cpp
-
-target.path = .
-target.commands = ./GooglePluginTests
-INSTALLS += target
diff --git a/tests/XdxfPluginTests/tests.pro b/tests/XdxfPluginTests/tests.pro
deleted file mode 100644 (file)
index 7ef99cb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-######################################################################
-# Automatically generated by qmake (1.07a) Wed Aug 4 11:35:12 2010
-######################################################################
-
-CONFIG += qtestlib
-QT += sql
-TARGET = xdxfPluginTests
-TEMPLATE = app
-INCLUDEPATH += .
-
-# Input
-HEADERS += test.h \
-    ../../src/plugins/xdxf/xdxfplugin.h \
-    ../../src/plugins/xdxf/TranslationXdxf.h \
-    ../../src/common/translation.h \
-    ../../src/common/settings.h \
-    ../../src/common/DictDialog.h \
-    ../../src/common/CommonDictInterface.h \
-    ../../src/plugins/xdxf/XdxfDictDialog.h \
-    ../../src/plugins/xdxf/XdxfLoadDialog.h \
-    ../../src/plugins/xdxf/XdxfSettingsDialog.h \
-    ../../src/plugins/xdxf/XdxfCachingDialog.h
-
-
-SOURCES += test.cpp \
-    ../../src/plugins/xdxf/xdxfplugin.cpp \
-    ../../src/plugins/xdxf/TranslationXdxf.cpp \
-    ../../src/plugins/xdxf/XdxfLoadDialog.cpp \
-    ../../src/plugins/xdxf/XdxfDictDialog.cpp \
-    ../../src/plugins/xdxf/XdxfCachingDialog.cpp \
-    ../../src/plugins/xdxf/XdxfSettingsDialog.cpp
-
-target.path = .
-target.commands = ./xdxfPluginTests
-INSTALLS += target
index 1287425..d812473 100644 (file)
@@ -36,11 +36,6 @@ target.commands += ./mDictionaryTests
 INSTALLS += target
 
 
-coverage {
-        LIBS += -lgcov
-        QMAKE_CXXFLAGS += -ftest-coverage -fprofile-arcs -fno-elide-constructors
-}
-
 check.depends = $$TARGET
-check.commands = ./mDictionaryTests
+check.commands = ./$${TARGET}
 QMAKE_EXTRA_TARGETS += check
index 18f3045..0acde8b 100644 (file)
@@ -1,12 +1,6 @@
-TEMPLATE=subdirs
-SUBDIRS = mDictionaryTests
+TEMPLATE = subdirs
+SUBDIRS = mDictionaryTests GooglePluginTests XdxfPluginTests
 
 check.CONFIG = recursive
-check.recurse = mDictionaryTests
+check.recurse = mDictionaryTests GooglePluginTests XdxfPluginTests
 QMAKE_EXTRA_TARGETS += check
-
-coverage {
-        # add flags to compiler
-        LIBS += -lgcov
-        QMAKE_CXXFLAGS += -ftest-coverage -fprofile-arcs -fno-elide-constructors
-}