<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64714>64714</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-tidy: [Documentation] CMake integration
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JVApen
</td>
</tr>
</table>
<pre>
According to [a post on Reddit](https://www.reddit.com/r/cpp/comments/15ru8gs/no_c_static_analysis_does_not_have_to_be_painful/jwbbizk) it ain't easy to know how to integrate clang-tidy into CMake. There is a variable for it, see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html Though the discovery of it ain't easy.
In meson there is a default clang-tidy target. I haven't checked other systems.
Given that https://clang.llvm.org/extra/clang-tidy/ already contains a link with all IDEs clang-tidy is integrated, having documentation on how to integrate with common build systems ain't far-fetched. Especially as most of those IDEs also have integration with CMake.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkU8Fu4zYQ_Rr6MoggU1JiH3TwxtEibbeHIijQkzAiRxLXFGmQI7vu1xeU42S9e6EJU_PmvTdvMEYzOKJaVF9EtV_hzKMP9W9_747kVp3Xl3qnlA_auAHYg6i-IBx9ZPAO_iKtDYtqL-RmZD5GUeyEbIRszudzFpbXTPlJyCYI2ajjMZ1-mshxFLJZV2HeDOnmfKvayMhGtejQXqKJrfYUW-e5HfFELfu2o_aIxvWzFbL5fu46899ByC0YBjROyCcGwnhJPA_On2H053Q3jmkIyATKohse2OhL-tPD8zc8UAZvIwUCEwHhhMFgZwl6H8CwkM8QieBenZpSmQ_D7S5kM5JN6iwyRRayuQEJ2Tx_2_3-0v6x-_Nr-7ycb6_7f7KRJwtvo5-HEXgk0CYqf6JwAd__rCgT-V7ku-v56mCi6F2qutHW1ONs-UeBjGEgzuAVkn1XLDWSOpAGn0ohXiLTFO_Av5oTJWTknzUn5Mza0_QunP7lgLeHpaWQDaANhPoCyjtG4xI3a9wBzoZHQGvhdf8S7-YQP-ejk90jnlLWtFdzygmy8S6F7ZdhLpApTd5BNxurb4I-rOsxPPTEaiSdwUs8kjJo7QUwwrREuAcefaQrKbTRL1599Eidly7XnKx0XehtscUV1evHrVwX621RrMYaCyVljpXMi6dyI8tHXVbUb9bq6XGLOeLK1DKXRb5Zp082VZFtdVludUFlX66pwo0oc5rQ2A-DVybGmerH8mldrix2ZOOyolI6OsPyKKRMGxvqVPPQzUMUZW5N5PiJwoYt1c-fIyp2aYX3P5orqv1V4J3u1RxsfR-BwfA4d-8LnVq8_zwcg_9OKqV-IZYWeiH-fwAAAP__0TJ4Fw">