f3eec6cba3
Added toolchain abstraction for coverage for both gcc and clang. Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
20 lines
237 B
CMake
20 lines
237 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
macro(toolchain_cc_coverage)
|
|
|
|
zephyr_compile_options(
|
|
-fprofile-arcs
|
|
-ftest-coverage
|
|
-fno-inline
|
|
)
|
|
|
|
if (NOT CONFIG_COVERAGE_GCOV)
|
|
|
|
zephyr_link_libraries(
|
|
-lgcov
|
|
)
|
|
|
|
endif()
|
|
|
|
endmacro()
|