Skip to content

Commit

Permalink
Fixed shared code not showing on ccov-all reports
Browse files Browse the repository at this point in the history
When collating the data from the individual runs, the only binary
objects listed were for the test executables themselves.

This was fine for statically linked code, but shared code is external to
these, and wouldn't show up on the final reports.

Thus, adding the executable's shared object links to the all target's
`binaries.list` file fixed this.
  • Loading branch information
StableCoder committed Oct 26, 2020
1 parent 34e3aff commit acc07ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code-coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function(target_code_coverage TARGET_NAME)
COMMAND
LLVM_PROFILE_FILE=${target_code_coverage_COVERAGE_TARGET_NAME}.profraw
$<TARGET_FILE:${TARGET_NAME}> ${target_code_coverage_ARGS}
COMMAND echo "-object=$<TARGET_FILE:${TARGET_NAME}>" >>
COMMAND echo "-object=$<TARGET_FILE:${TARGET_NAME}>" ${SO_OBJECTS} >>
${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list
COMMAND
echo
Expand Down

0 comments on commit acc07ef

Please sign in to comment.