Skip to content

Commit ab84626

Browse files
committed
Get coverage data explicitly from the binary dir
If the binary directory is completely outside the source directory, then the .da files will not be found, because the --directory flag for lcov was pointing into the source directory.
1 parent f331072 commit ab84626

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake-init/templates/common/cmake/coverage.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(
66
COVERAGE_TRACE_COMMAND
77
lcov -c -q
88
-o "${PROJECT_BINARY_DIR}/coverage.info"
9-
-d "${PROJECT_SOURCE_DIR}"
9+
-d "${PROJECT_BINARY_DIR}"
1010
--include "${PROJECT_SOURCE_DIR}/*"
1111
CACHE STRING
1212
"; separated command to generate a trace for the 'coverage' target"

0 commit comments

Comments
 (0)