From fc6dc8b935dbb01e7844e2cd7f85de10daf68f92 Mon Sep 17 00:00:00 2001 From: franneck94 Date: Sat, 9 Mar 2024 10:14:24 +0100 Subject: [PATCH] cov changes --- README_install.md | 7 +++++++ cmake/CodeCoverage.cmake | 30 +----------------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/README_install.md b/README_install.md index ef976e3..fba8f95 100644 --- a/README_install.md +++ b/README_install.md @@ -44,6 +44,13 @@ Cmake-Format: pip install cmake-format # python 3.7+ ``` +### Coverage Tools + +```bash +sudo apt-get install gcovr +pip install -U gcovr +``` + ### Install Clang Tools It's included in the LLVM toolchain, but also installable by apt, brew, winget etc. diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index a6bd2bd..5c78fc6 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -134,7 +134,7 @@ function(setup_target_for_coverage_gcovr_html) set(GCOVR_EXTRA_FLAGS --json-summary --json-summary-pretty - --html-them + --html-theme green) set(GCOVR_HTML_CMD ${GCOVR_PATH} @@ -151,34 +151,6 @@ function(setup_target_for_coverage_gcovr_html) ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}) - if(CODE_COVERAGE_VERBOSE) - message(STATUS "Executed command report") - - message(STATUS "Command to run tests: ") - string( - REPLACE ";" - " " - GCOVR_HTML_EXEC_TESTS_CMD_SPACED - "${GCOVR_HTML_EXEC_TESTS_CMD}") - message(STATUS "${GCOVR_HTML_EXEC_TESTS_CMD_SPACED}") - - message(STATUS "Command to create a folder: ") - string( - REPLACE ";" - " " - GCOVR_HTML_FOLDER_CMD_SPACED - "${GCOVR_HTML_FOLDER_CMD}") - message(STATUS "${GCOVR_HTML_FOLDER_CMD_SPACED}") - - message(STATUS "Command to generate gcovr HTML coverage data: ") - string( - REPLACE ";" - " " - GCOVR_HTML_CMD_SPACED - "${GCOVR_HTML_CMD}") - message(STATUS "${GCOVR_HTML_CMD_SPACED}") - endif() - add_custom_target( ${Coverage_NAME} COMMAND ${GCOVR_HTML_EXEC_TESTS_CMD}