Skip to content
Snippets Groups Projects
Commit 6c42100a authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Improved ctest call

parent 620f24fc
No related branches found
No related tags found
No related merge requests found
......@@ -162,13 +162,18 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Coverage")
set(GCOVR_OPTIONS --object-directory="${PASTIS_BINARY_DIR}" -r "${PASTIS_SOURCE_DIR}/src" -e "${PASTIS_SOURCE_DIR}/src/experimental" -e "${PASTIS_SOURCE_DIR}/src/main.cpp" ${GCOVR_EXTRA})
add_custom_target(run_unit_tests
ALL
COMMAND ${CMAKE_CTEST_COMMAND} -j ${PROCESSOR_COUNT}
DEPENDS unit_tests pastis
COMMENT "Executing unit tests."
)
add_custom_target(coverage
ALL
COMMAND ctest -j ${PROCESSOR_COUNT}
COMMAND ${GCOVR} ${GCOVR_OPTIONS}
DEPENDS unit_tests pastis
DEPENDS run_unit_tests
COMMENT "Running gcovr to build coverage report."
USES_TERMINAL
)
add_custom_target(coverage-report
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment