Add an option to build Plasma with coverage

At this moment we only add some flags to linker and compiler, lets hope
it is enough.
This commit is contained in:
Àlex Fiestas 2014-07-23 20:22:15 +02:00
parent a059748fbc
commit af2a44784f

View File

@ -124,7 +124,12 @@ include(KF5PlasmaMacros.cmake)
option(BUILD_EXAMPLES "Build and install Plasma examples." OFF)
option(BUILD_COVERAGE "Build Plasma Frameworks with gcov support" OFF)
if(BUILD_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
endif()
################ create PlasmaConfig.cmake and install it ###########################