Lint and Static Analysis Tools¶
Several lint and static analysis tools may be configured within CMake to run as part of a build.
clang-tidy is a linter and static analyzer based on Clang. It is supported by CMake 3.6 and above.
mkdir build && cd build cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DUSE_CLANG_TIDY:BOOL=ON .. cmake --build .