Compile commands.json
lastmod 2025-02-14created 2024-10-245 edits
A JSON file generated by CMake or another build system that contains information on how each source file in a project is compiled. It is mainly used by code analysis and autocompletion tools such as clangd, cquery, and YouCompleteMe.
Project setup using cmake
See Clangd#Project setup for details.
Make it yourself
Create it in the following format:
[
{
"directory": "/home/user/Project/answerjet-relay/build",
"command": "/usr/bin/cc -Danswerjet_relay_EXPORTS -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIC -fPIC -o CMakeFiles/answerjet_relay.dir/gst_answerjet_relay.c.o -c /home/user/Project/answerjet-relay/gst_answerjet_relay.c",
"file": "/home/user/Project/answerjet-relay/gst_answerjet_relay.c"
}
]
See also
- YouCompleteMe
- Opm:YouCompleteMe