CMake not generating compile_commands.json

This ended up being an issue with using an old version of CMake. I ended up installing the newest version and it worked as expected.

According to Clang docs

“Currently CMake (since 2.8.5) supports generation of compilation databases for Unix Makefile builds (Ninja builds in the works) with the option CMAKE_EXPORT_COMPILE_COMMANDS.”

Leave a Comment

tech