File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ if(BUILD_CODE_COVERAGE)
5151 include (CodeCoverage)
5252 APPEND_COVERAGE_COMPILER_FLAGS()
5353 # Exclude all code not directly generated by user from code coverage
54- set (COVERAGE_GCOVR_EXCLUDES
54+ set (COVER_GCOVR_EXCLUDES
5555 "/usr/*"
5656 "${PROJECT_SOURCE_DIR} /test/*"
5757 "${PROJECT_SOURCE_DIR} /extern/*"
@@ -65,14 +65,17 @@ if(BUILD_CODE_COVERAGE)
6565 )
6666 # Create target for code coverage
6767 SETUP_TARGET_FOR_COVERAGE_LCOV(
68- NAME code-coverage
69- EXECUTABLE sh ${test_runner}
70- DEPENDS ${test_runner}
68+ NAME code-coverage
69+ EXECUTABLE sh ${test_runner}
70+ DEPENDS ${test_runner}
71+ EXCLUDE ${COVER_GCOVR_EXCLUDES}
72+ LCOV_ARGS "--ignore-errors" "mismatch"
7173 )
7274 SETUP_TARGET_FOR_COVERAGE_GCOVR_XML(
73- NAME code-coverage-gcov
74- EXECUTABLE sh ${test_runner}
75- DEPENDS ${test_runner}
75+ NAME code-coverage-gcov
76+ EXECUTABLE sh ${test_runner}
77+ DEPENDS ${test_runner}
78+ EXCLUDE ${COVER_GCOVR_EXCLUDES}
7679 )
7780endif ()
7881
You can’t perform that action at this time.
0 commit comments