Skip to content

Commit dd79c46

Browse files
committed
Prepare gcov processeing
1 parent d462d55 commit dd79c46

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ endif()
7676
if(BEMAN_EXEMPLAR_BUILD_EXAMPLES)
7777
add_subdirectory(examples)
7878
endif()
79+
80+
# Coverage
81+
configure_file(cmake/gcovr.cfg.in gcovr.cfg @ONLY)
82+
83+
add_custom_target(
84+
process_coverage
85+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
86+
DEPENDS test
87+
COMMENT "Running gcovr to process coverage results"
88+
COMMAND mkdir -p coverage
89+
COMMAND gcovr --config gcovr.cfg .
90+
)

cmake/gcovr.cfg.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = @CMAKE_SOURCE_DIR@
2+
cobertura = @CMAKE_BINARY_DIR@/coverage/cobertura.xml
3+
sonarqube = @CMAKE_BINARY_DIR@/coverage/sonarqube.xml
4+
html-details = @CMAKE_BINARY_DIR@/coverage/coverage.html
5+
# XXX gcov-executable = @GCOV_EXECUTABLE@
6+
gcov-parallel = yes
7+
html-theme = blue
8+
html-self-contained = yes
9+
print-summary = yes
10+
filter = .*/beman/inplace_vector/.*
11+
exclude = .*\.t\.cpp

0 commit comments

Comments
 (0)