-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage #682
base: main
Are you sure you want to change the base?
Coverage #682
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,6 +202,19 @@ endif(ENABLE_ORC) | |
######################################################################## | ||
add_subdirectory(docs) | ||
|
||
######################################################################## | ||
# Setup Coverage | ||
######################################################################## | ||
if(${CMAKE_BUILD_TYPE} STREQUAL "Coverage") | ||
include(CodeCoverage) | ||
append_coverage_compiler_flags() | ||
setup_target_for_coverage_gcovr_html( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why only html output and why gcovr? IIRC lcov is the more mature and complete tool. Allowing regular coverage output we can hook that into codecov.io pipelines and add information to pullrequests and pushes to track coverage as we go. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gcov vs lcov: TBH, because I looked into lcov first, couldn't make it work, and then resorted to doing what was possible within limited time :) html: because I wanted this to be immediately useful for insights, and hence jumped on a minimum effort way of getting readable output. Proper CI integration, including things like complaining when you add code that is specifically not well-covered, is something that needs to come – but having this seemed better than not having it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gcov vs lcov: TBH, because I looked into lcov first, couldn't make it work, and then resorted to doing what was possible within limited time :) html: because I wanted this to be immediately useful for insights, and hence jumped on a minimum effort way of getting readable output. Proper CI integration, including things like complaining when you add code that is specifically not well-covered, is something that needs to come – but having this seemed better than not having it. |
||
NAME coverage | ||
EXECUTABLE "ctest" | ||
DEPENDENCIES volk_profile | ||
) | ||
endif() | ||
|
||
######################################################################## | ||
# Detect /lib versus /lib64 | ||
######################################################################## | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the CodeCoverage.cmake setting the Build_Type to anything other than Debug results in a warning. Either removing that check from there or leaving the
CMAKE_BUILD_TYPE
alone and just adding a switch to enable coverage would be an option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is honestly just a mirror of what GR does; looking back, yes, having extra flags instead of a build type of its own would have been a worthwhile option, but I foreseeable won't have time to implement that.