trafficserver
trafficserver copied to clipboard
Add ENABLE_CLANG_TIDY option
CMake has a property called <LANG>_CLANG_TIDY. This adds a function, clang_tidy_check, that set the property to the target if ENABLE_CLANG_TIDY is true. If it's enabled, clang-tidy check the rule in the .clang-tidy file when the target is compiled.
https://cmake.org/cmake/help/v3.29/prop_tgt/LANG_CLANG_TIDY.html
The option is slightly different from what we used to have with auto tools, make clang-tidy, but this looks straight forward with cmake.
This only has tscore and tsutil for the clang_tidy_check target. If this approach looks good, I'll add more targets.