I used to use Bear for generating the compilation database, but I've moved to CMake and want to automate the task of generating compilation database.
I invoke CMake from a different directory called
build/, so my root folder wouldn't get cluttered. But that also means that CMake generates the compilation database in that
build/ directory. Neovim LSP client only looks for
compile_commands.json in the root folder.
How do I point the LSP client to the compilation database in a different directory?