Add a build option to compile with gcov support

New build option KWIN_BUILD_COVERAGE which adds
"-fprofile-arcs -ftest-coverage" to CMAKE_CXX_FLAGS and "-lgcov" to
CMAKE_EXE_LINKER_FLAGS.

REVIEW: 117369
icc-effect-5.14.5
Martin Gräßlin 2014-04-04 13:24:35 +02:00
parent fbec8ea12c
commit 8a2df7ac4d
1 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,13 @@ option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Comp
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
option(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF)
option(KWIN_BUILD_COVERAGE "Build KWin with gcov support" OFF)
if(KWIN_BUILD_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
endif()
# Binary name of KWin
set(KWIN_NAME "kwin")
set(KWIN_VERSION_MAJOR 4)