• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FIND_PROGRAM( LCOV_PATH lcov )
2FIND_PROGRAM( GENHTML_PATH genhtml )
3
4if (LCOV_PATH)
5  # message ( "lcov: ${LCOV_PATH}" )
6
7  add_custom_target(coverage_report
8    COMMAND "${LCOV_PATH}" --rc lcov_branch_coverage=1  --no-checksum --base-directory "${CMAKE_CURRENT_SOURCE_DIR}" --directory src/CMakeFiles/${PROJECT_NAME}.dir --no-external --capture --output-file ${PROJECT_NAME}.info
9    COMMAND "${GENHTML_PATH}" --rc genhtml_branch_coverage=1 --output-directory lcov ${PROJECT_NAME}.info
10    COMMAND echo "Coverage report in: file://${CMAKE_BINARY_DIR}/lcov/index.html"
11  )
12endif()
13