Флаг для компоновки
This commit is contained in:
parent
c9ac3f56ed
commit
abfce824d2
@ -4,6 +4,9 @@ function(add_code_coverage)
|
|||||||
find_program(LCOV_EXE NAMES lcov)
|
find_program(LCOV_EXE NAMES lcov)
|
||||||
find_program(GENHTML_EXE NAMES genhtml)
|
find_program(GENHTML_EXE NAMES genhtml)
|
||||||
target_compile_options(${_target} PUBLIC "--coverage")
|
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)
|
if(LCOV_EXE)
|
||||||
add_custom_target(coverage-${_target}
|
add_custom_target(coverage-${_target}
|
||||||
|
Loading…
Reference in New Issue
Block a user