Enable to collect code coverage of samples/simple (#2003)

This commit is contained in:
Wenyong Huang
2023-03-07 08:45:03 +08:00
committed by GitHub
parent 04616d398d
commit 5a7fbda7ac
8 changed files with 154 additions and 28 deletions

View File

@ -348,5 +348,6 @@ endif ()
if ("$ENV{COLLECT_CODE_COVERAGE}" STREQUAL "1" OR COLLECT_CODE_COVERAGE EQUAL 1)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
add_definitions (-DCOLLECT_CODE_COVERAGE)
message (" Collect code coverage enabled")
endif ()