File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -273,9 +273,7 @@ if (ENABLE_COVERAGE)
273273 )
274274
275275 target_link_libraries (
276- GameAnalytics
277- PRIVATE
278- --coverage
276+ GameAnalytics PRIVATE -fprofile-arcs -ftest-coverage
279277 )
280278
281279 set (covname cov)
@@ -289,13 +287,22 @@ if (ENABLE_COVERAGE)
289287 COMMAND GameAnalyticsUnitTests
290288
291289 # Capturing lcov counters and generating report
292- COMMAND ${LCOV_PATH} --directory . --capture --output -file ${covname} .info
290+
291+ COMMAND echo "Processing code coverage counters and generating report."
292+
293+ COMMAND ${LCOV_PATH} --directory . --capture --output -file ${covname} .info --branch-coverage --rc geninfo_unexecuted_blocks=1 --rc no_exception_branch=1
294+
295+ COMMAND echo "Removing unwanted files from coverage report."
296+
293297 COMMAND ${LCOV_PATH} --remove ${covname} .info
294298 '${CMAKE_SOURCE_DIR} /source /dependencies/*'
295299 '${CMAKE_SOURCE_DIR} /test /*'
296300 '/usr/*'
297301 '/Applications/Xcode.app/*'
298302 --output -file ${covname} .info.cleaned
303+ --ignore -errors unused
304+
305+ COMMAND echo "Finished processing code coverage counters and generating report."
299306 )
300307
301308 if (GENHTML_PATH)
You can’t perform that action at this time.
0 commit comments