diff --git a/MyxCMake/modules/MyxCMakeCodeCoverage.cmake b/MyxCMake/modules/MyxCMakeCodeCoverage.cmake index bfa730e..4a2b150 100644 --- a/MyxCMake/modules/MyxCMakeCodeCoverage.cmake +++ b/MyxCMake/modules/MyxCMakeCodeCoverage.cmake @@ -17,8 +17,10 @@ function(myx_cmake_code_coverage target) add_custom_target( ${target}-coverage WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND ${LCOV_EXE} --test-name ${target} --output "${target}.lcov" - --capture --directory ${CMAKE_BINARY_DIR}) + COMMAND ${LCOV_EXE} --test-name ${target} --output "${target}.lcov" --capture + --exclude "/usr/\\\*" + --exclude "${CMAKE_BINARY_DIR}/\\\*" + --directory ${CMAKE_BINARY_DIR}) add_dependencies(${target}-coverage ${target}) if(GENHTML_EXE)