aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cd501b..2730975 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()