From 6bacc0d5db885a72202cb7f80e505642a36052d4 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 11 Sep 2012 17:57:08 -0300 Subject: Splitted qmenumodel plugin in two libraries to make it testable. Create unit test for qmenumodel library. --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d8dad33..65e6fa8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ find_package(Qt4 REQUIRED) include(FindPkgConfig) pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32) +pkg_check_modules(GIO REQUIRED gio-2.0>=2.32) add_definitions(-DQT_NO_KEYWORDS) find_program(DBUS_RUNNER dbus-test-runner) @@ -14,7 +15,10 @@ find_program(DBUS_RUNNER dbus-test-runner) OPTION(BUILD_WITH_COVERAGE "Build with coverage analysis support" OFF) if(BUILD_WITH_COVERAGE) message(STATUS "Using coverage flags") - SET(COVERAGE_COMMAND "/usr/bin/gcov") + find_program(COVERAGE_COMMAND gcov) + if(NOT COVERAGE_COMMAND) + message(FATAL_ERROR "gcov command not found") + endif() SET(CMAKE_C_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage") SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov") @@ -24,6 +28,14 @@ endif() add_subdirectory(src) add_subdirectory(examples) +# Tests Tools +if(NOT DBUS_RUNNER) + message(STATUS "dbus-test-runner not found tests disabled.") +else() + enable_testing() + add_subdirectory(tests) +endif() + # Tests Tools #if(NOT DBUS_RUNNER) -- cgit v1.2.3