Compile_commands.json Gallery
blog.bkryza.comIf you've ever tried to use any Clang-based tooling such as clangd, ccls, clang-tidy, include-what-you-use and many others, you probably had to figure out yourself how to generate the compilation database within your setup.
This post describes my attempt to generate compile_commands.json database from as many C/C++ build systems as possible (I've managed 17 + plugins). For each build system you can find steps how to setup the same reference Hello World C++17 project, generate the compile_commands.json and verify whether it works with clang-tidy and discusses issues (if any) and how to resolve them.
The list of build systems covered in the post include: B2, Bazel, Buck2, build2, CMake, Clang++, FASTBuild, Make, Meson Build, MSVC, Ninja, Premake, Qbs, SCons, Waf, XCode and xmake.