sanitycheck: support coverage with unit tests
Fix setting coverage for unit tests and link against gcov when coverage is enabled. Fixes #24674 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
1ed6a3889b
commit
051602f4f3
2 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,10 @@ if(COVERAGE)
|
|||
-fprofile-arcs
|
||||
-ftest-coverage
|
||||
)
|
||||
|
||||
target_link_libraries(testbinary PRIVATE
|
||||
-lgcov
|
||||
)
|
||||
endif()
|
||||
|
||||
if(LIBS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue