Add general coverage target

This commit is contained in:
Martchus 2017-06-19 14:01:33 +02:00
parent 6807d899d2
commit 64572e6860
1 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,10 @@ if(CPP_UNIT_LIB OR META_NO_CPP_UNIT)
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_tests_coverage.txt"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_tests_coverage.html"
)
if(NOT TARGET coverage)
add_custom_target(coverage)
endif()
add_dependencies(coverage "${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_tests_coverage")
else()
message(WARNING "Unable to generate target for coverage report because llvm-profdata and llvm-cov are not available.")
endif()