Флаг для компоновки

This commit is contained in:
Andrei Astafev 2019-10-08 16:25:52 +03:00
parent c9ac3f56ed
commit abfce824d2

View File

@ -4,6 +4,9 @@ function(add_code_coverage)
find_program(LCOV_EXE NAMES lcov)
find_program(GENHTML_EXE NAMES genhtml)
target_compile_options(${_target} PUBLIC "--coverage")
get_target_property(LF ${_target} LINK_FLAGS)
list(APPEND LF "--coverage")
set_target_properties(${_target} PROPERTIES LINK_FLAGS ${LF})
if(LCOV_EXE)
add_custom_target(coverage-${_target}