aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-08 17:38:23 +0000
committerTarmac <>2012-11-08 17:38:23 +0000
commit1915b094437bc94aa4ea44e4ccf489456f375e06 (patch)
tree904b3c37a881caefe78ccfaca6d1dd28d782fce6 /CMakeLists.txt
parentfc58dd68e0f40fe4fdb93a49333d7f56fea44b30 (diff)
parent67680f3a61e0e64bf46a63eb4ce7ce3091f1335a (diff)
downloadqmenumodel-1915b094437bc94aa4ea44e4ccf489456f375e06.tar.gz
qmenumodel-1915b094437bc94aa4ea44e4ccf489456f375e06.tar.bz2
qmenumodel-1915b094437bc94aa4ea44e4ccf489456f375e06.zip
Updates to get coverage and test results in jenkins.
Approved by Sergio Schvezov.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
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()