Skip to content

Commit

Permalink
cov changes
Browse files Browse the repository at this point in the history
  • Loading branch information
franneck94 authored and franneck94 committed Mar 9, 2024
1 parent 377ebd2 commit fc6dc8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
7 changes: 7 additions & 0 deletions README_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 1 addition & 29 deletions cmake/CodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down

0 comments on commit fc6dc8b

Please sign in to comment.