diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cd501b..7f60630 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,16 +16,16 @@ add_definitions(-DQT_NO_KEYWORDS) find_program(DBUS_RUNNER dbus-test-runner) # Cooverage tools -OPTION(BUILD_WITH_COVERAGE "Build with coverage analysis support" OFF) -if(BUILD_WITH_COVERAGE) +OPTION(ENABLE_COVERAGE "Build with coverage analysis support" OFF) +if(ENABLE_COVERAGE) message(STATUS "Using coverage flags") 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") + SET(CMAKE_C_FLAGS "-g -O0 -Wall --coverage") + SET(CMAKE_CXX_FLAGS "-g -O0 -Wall --coverage") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") include(${CMAKE_SOURCE_DIR}/cmake/lcov.cmake) endif() @@ -35,11 +35,12 @@ add_subdirectory(libqmenumodel) if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() + # We need to enable test to create the 'make check' target mandatory on jenkins + enable_testing() if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") message(STATUS "Current version of qemu crashes during the tests. We will skip it for now.") else() - message(STATUS "Enable tests for: ${CMAKE_SYSTEM_PROCESSOR}") - enable_testing() + message(STATUS "Tests enabled for arch: ${CMAKE_SYSTEM_PROCESSOR}") add_subdirectory(tests) endif() endif() |