[cmake-developers] custom_command and compile_commands.json

Brad King brad.king at kitware.com
Tue Nov 21 09:59:57 EST 2017


On 11/21/2017 05:31 AM, Máté Ferenc Nagy-Egri via cmake-developers wrote:
> can we export custom commands into compile_commands.json?

The purpose of that file is to make compile commands available to
tools like clang-tidy.  Custom commands do not belong in it.
Its purpose has been largely superseded by first-class support
for running such tools along with the compiler, e.g.

 https://cmake.org/cmake/help/v3.10/prop_tgt/LANG_CLANG_TIDY.html

It is also not produced by all generators.

> have the relevant Visual Studio Code extensions hook into
> ... LaTeX-Workshop extensino is not.

Please explain this use case.

-Brad


More information about the cmake-developers mailing list