Support `CMAKE_EXPORT_COMPILE_COMMANDS` for all generators
I'm working on a libclang-based tool that requires loading some C++ files, and generates some new source files that other targets would depend on.
It would be really useful to be able to generate a compile_commands.json
CompilationDatabase for a given target, rather than having to manually re-set all of the compilation flags for the script to use, but since I'm most often developing with Xcode, this is infeasible until CMAKE_EXPORT_COMPILE_COMMANDS
is supported on other generators.