diff --git a/CMLibCodeCoverage.cmake b/CMLibCodeCoverage.cmake index 54abfdd..b3b55a3 100644 --- a/CMLibCodeCoverage.cmake +++ b/CMLibCodeCoverage.cmake @@ -3,7 +3,7 @@ function(add_code_coverage) find_program(LCOV_EXE NAMES lcov) find_program(GENHTML_EXE NAMES genhtml) - target_compile_options(_target PUBLIC "--coverage") + target_compile_options(${_target} PUBLIC "--coverage") if(LCOV_EXE) add_custom_target(coverage-${_target}