diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-11 13:53:49 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-11 13:53:49 +0200 |
commit | 422a2eba84361a8dfd84b549c13037512779c572 (patch) | |
tree | d06d641e245a453094a0e881fc05298c363e32a4 /CMakeLists.txt | |
parent | e09a8a611e27e1f08dbe8415dafa4679e5ab23fc (diff) |
CMake: Add coverage build type
This allows us to easily test coverage
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a26b32d71..39c1bcedc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,11 @@ option(USE_NLS "Localisation support." ON) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake") +# Add coverage target +set(CMAKE_CXX_FLAGS_COVERAGE "-g -fprofile-arcs -ftest-coverage") +set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "-lgcov") +set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "-lgcov") + # Work around bug in GNUInstallDirs if (EXISTS "/etc/debian_version") set(CMAKE_INSTALL_LIBEXECDIR "lib") |