Add option to skip static analysis targets#512
Conversation
When building ddprof as a dependency (Conan, FetchContent), the static analysis targets (cppcheck, clang-tidy, format) are unnecessary. They add configure-time tool lookups and can fail if the tools aren't installed. Add a `DDPROF_ENABLE_STATIC_ANALYSIS` option (ON by default) so consumers can skip them with `-DDDPROF_ENABLE_STATIC_ANALYSIS=OFF`. Also includes the `if(TARGET cppcheck)` guard from PR #1 for safety. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
0e98555 to
7c43563
Compare
|
👋 I am totally OK with the change, though are the released versions somehow not useable ? |
The v0.23.0 library has issues that causes crashes on production; this should be fixed when the next release is out, but in the meantime we tried to package a "trunk" release on our side. We can wait for the next one if it is planned soon though. |
|
Thanks for the update, I have some work to take recent |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
0c70035
into
DataDog:main
Summary
When building ddprof as a dependency (Conan, FetchContent, ExternalProject), the static analysis targets (cppcheck, clang-tidy, format) are unnecessary overhead. They run configure-time tool lookups and can fail if the tools aren't installed.
Following the pattern used by projects like abseil-cpp which gate dev tooling behind options, this adds a
DDPROF_ENABLE_STATIC_ANALYSISoption so consumers can disable them.This PR includes the
if(TARGET cppcheck)guard from #510. If #510 lands first, this PR needs a trivial rebase. If this PR lands first, #510 becomes unnecessary.How
Wrap the
include(ClangTidy),include(Format), andinclude(CppcheckConfig)blocks in a singleif()guard. Default is ON so existing builds are unaffected. Consumers pass-DDDPROF_ENABLE_STATIC_ANALYSIS=OFFto skip everything.🤖 Generated with Claude Code