summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 960b5d1..b6411ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@ set(${PROJECT_NAME}_VERSION_MINOR 0)
set(${PROJECT_NAME}_VERSION_SUFFIX "~dev")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage")
# Define a __FILENAME__ macro to get the filename of each file, instead of
# the full path as in __FILE__
@@ -183,6 +184,15 @@ add_custom_target(check COMMAND "test_suite"
DEPENDS test_suite)
#
+## Code coverage
+#
+include(CodeCoverage)
+SETUP_TARGET_FOR_COVERAGE(coverage
+ test_suite
+ coverage
+)
+
+#
## Install target
#
install(TARGETS ${PROJECT_NAME}
@@ -213,4 +223,4 @@ endif()
add_custom_target(PrintBuildParameters ALL
${CMAKE_COMMAND} -E cmake_echo_color --cyan "Compiling ${PROJECT_NAME} with ${STR_WITH_BOTAN}, ${STR_WITH_CARES}")
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h) \ No newline at end of file
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/biboumi.h.cmake ${CMAKE_BINARY_DIR}/src/biboumi.h)