From: Julian Andres Klode Date: Sun, 11 Sep 2016 11:53:49 +0000 (+0200) Subject: CMake: Add coverage build type X-Git-Tag: 1.3~4 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/422a2eba84361a8dfd84b549c13037512779c572 CMake: Add coverage build type This allows us to easily test coverage --- 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")