Does 'compile_commands.json' need to be in top level project?
I have a project that pulls in CMocka with CMake using FetchContent. When I build my project in testing mode, a symlink is created in my top project directory to 'compile_commands.json' in the CMocka build directory. I see in the comments that this is for 'clangd' support and you've added this file to your .gitignore.
Is it necessary to have this file in the top level project or would it still work if it was symlinked instead to the CMocka source directory? I don't believe CMocka should be creating file upstream as a dependency but I may be wrong. I don't have clangd as part of my workflow (yet?) so I'm asking to improve my understanding.