Skip to content

Commit cf0f1d1

Browse files
committed
Prepare gcov processeing
1 parent b6eefec commit cf0f1d1

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
@@ -82,3 +82,15 @@ endif()
8282
if(BEMAN_EXEMPLAR_BUILD_EXAMPLES)
8383
add_subdirectory(examples)
8484
endif()
85+
86+
# Coverage
87+
configure_file(cmake/gcovr.cfg.in gcovr.cfg @ONLY)
88+
89+
add_custom_target(
90+
process_coverage
91+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
92+
DEPENDS test
93+
COMMENT "Running gcovr to process coverage results"
94+
COMMAND mkdir -p coverage
95+
COMMAND gcovr --config gcovr.cfg .
96+
)

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)