File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,20 @@ target_compile_features(advance_with_begin PRIVATE cxx_std_20)
29
29
30
30
add_executable (task task.cpp )
31
31
target_compile_features (task PRIVATE cxx_std_20 )
32
+
33
+ if (TARGET generate_coverage )
34
+ add_custom_target (
35
+ run_examples
36
+ COMMAND eager_task
37
+ COMMAND run_awaitable
38
+ COMMAND sync_generator_adapter
39
+ COMMAND async_generator
40
+ COMMAND generator
41
+ COMMAND generator_iterator
42
+ COMMAND advance_with_begin
43
+ COMMAND task
44
+ DEPENDS eager_task run_awaitable sync_generator_adapter async_generator generator generator_iterator advance_with_begin task
45
+ )
46
+
47
+ add_dependencies (generate_coverage run_examples )
48
+ endif ()
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ if(ENABLE_COVERAGE)
75
75
COMMAND ${CMAKE_COMMAND} -E rm -rf "${PROJECT_BINARY_DIR} /coverage"
76
76
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR} /coverage"
77
77
COMMAND
78
- gcovr -f "${PROJECT_SOURCE_DIR} /src/" -r "${PROJECT_SOURCE_DIR} "
78
+ gcovr -f "${PROJECT_SOURCE_DIR} /src/" -f " ${PROJECT_SOURCE_DIR} /examples/" - r "${PROJECT_SOURCE_DIR} "
79
79
--html-details -o "${PROJECT_BINARY_DIR} /coverage/index.html"
80
80
--exclude-noncode-lines --exclude-throw-branches --exclude-unreachable-branches --decisions
81
81
--gcov-executable= "${GCOV_TOOL} "
You can’t perform that action at this time.
0 commit comments