find_program(GCOV_PATH gcov)
find_program(LCOV_PATH NAMES lcov)
find_program(GENHTML_PATH NAMES genhtml)
+ find_program(ZIP_PATH NAMES zip)
if(NOT GCOV_PATH)
message(FATAL_ERROR "gcov not found! Aborting...")
# Setup target
add_custom_target(${COV_NAME}
-
COMMAND ${LCOV_PATH} ${COV_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -directory . -b ${BASEDIR} --zerocounters
-
COMMAND ${COV_EXECUTABLE} ${COV_EXECUTABLE_ARGS}
-
COMMAND ${LCOV_PATH} ${COV_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory . -b ${BASEDIR} --capture --output-file ${COV_NAME}.total
-
COMMAND ${LCOV_PATH} ${COV_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove ${COV_NAME}.total ${LCOV_EXCLUDES} --output-file ${COV_NAME}.info
-
COMMAND ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${COV_GENHTML_ARGS} -o ${COV_NAME} ${COV_NAME}.info
+ COMMAND ${ZIP_PATH} -r ${target}.zip ${COV_NAME}
BYPRODUCTS
${COV_NAME}.total