CMAKE_EXPORT_COMPILE_COMMANDS environment variable isn't supported for all Makefile generators
It seems like the intention was for the CMAKE_EXPORT_COMPILE_COMMANDS
environment variable to be honoured for all Makefiles generators. This is more or less what the docs for the CMAKE_EXPORT_COMPILE_COMMANDS
CMake variable state. However, the implementation in CMakeGenericSystem.cmake
matches against Unix Makefiles
rather than just Makefiles
, so the environment variable is only currently getting picked up for the Unix Makefiles
generator. I suspect the regular expression should be relaxed to just match Makefiles
. This would still leave out the "Watcom WMake" generator, but I have no experience with that to know whether exporting the compile_commands.json
file is supported for that generator.
The documentation for the environment variable should also be updated to make the same statement as the CMake variable regarding which generators support it.