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
This commit is contained in:
Martin Gräßlin 2014-04-04 13:24:35 +02:00
parent fbec8ea12c
commit 8a2df7ac4d

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) 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_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 # Binary name of KWin
set(KWIN_NAME "kwin") set(KWIN_NAME "kwin")
set(KWIN_VERSION_MAJOR 4) set(KWIN_VERSION_MAJOR 4)