From abfce824d2ee22ab728ed3fba745d215118c360d Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 8 Oct 2019 16:25:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=BB=D0=B0=D0=B3=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCodeCoverage.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMLibCodeCoverage.cmake b/CMLibCodeCoverage.cmake index b3b55a3..50d9898 100644 --- a/CMLibCodeCoverage.cmake +++ b/CMLibCodeCoverage.cmake @@ -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}