Skip to content

Commit

Permalink
Add option to generate coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
danvratil committed Jul 5, 2022
1 parent deb80c1 commit 0f0408c
Show file tree
Hide file tree
Showing 4 changed files with 686 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -133,6 +133,10 @@ endif()
include(qcoro/QCoroMacros.cmake)
qcoro_enable_coroutines()

include(cmake/CodeCoverage.cmake)
add_code_coverage()
add_code_coverage_all_targets(EXCLUDE "${CMAKE_BINARY_DIR}" tests/utils/*)

#-----------------------------------------------------------#
# Definitions
#-----------------------------------------------------------#
Expand Down
4 changes: 4 additions & 0 deletions cmake/AddQCoroLibrary.cmake
Expand Up @@ -116,8 +116,12 @@ function(add_qcoro_library)
VERSION ${qcoro_VERSION}
SOVERSION ${qcoro_SOVERSION}
)
target_code_coverage(${target_name} AUTO)
else()
target_code_coverage(${target_name} AUTO INTERFACE)
endif()


generate_headers(
camelcase_HEADERS
HEADER_NAMES ${LIB_CAMELCASE_HEADERS}
Expand Down

0 comments on commit 0f0408c

Please sign in to comment.