-
Notifications
You must be signed in to change notification settings - Fork 35
Enable gcov #511
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
Enable gcov #511
Conversation
@@ -104,6 +104,12 @@ function(add_umf_target_compile_options name) | |||
${name} PRIVATE -Werror -fno-omit-frame-pointer | |||
-fstack-protector-strong) | |||
endif() | |||
if(USE_GCOV) | |||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") | |||
message(FATAL_ERROR "To use gcov, the build type must be Debug") |
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.
is it truly a fatal error? I guess we get a different results for Release, but it should work, right...?
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.
From the Clang documentation:
gcov - A GCC-compatible coverage implementation which operates on DebugInfo. This is enabled by -ftest-coverage or --coverage.
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.
Soo.. it might work in the build type "RelWithDebInfo"...?
2d25e3e
to
d409573
Compare
This commit introduces the option to enable gcov support in the build system. The USE_GCOV option has been added to allow gcov instrumentation.
pls don't treat my last issue as a blocker 😉 |
Description
This pull request introduces support for gcov, a test coverage program that developers can use to assess the effectiveness of their test suites. The changes include:
With these changes, contributors can now enable gcov support in their debug builds to generate coverage reports, helping to maintain and improve the quality of the test suite.
Checklist