Closed avalonwilliams closed 5 years ago
Is the issue you're seeing using compdb in a Makefile related to this?
https://stackoverflow.com/questions/11755312/redirecting-stdout-and-stderr-inside-a-makefile-rule
No, using it in a Makefile is fine, however, the problem is mostly with compatibility with certain plugins/ides that don't execute the command in /bin/sh or similar, but call the executable directly.
Fixed in https://github.com/Sarcasm/compdb/commit/43a3455fc949e630cfb7a00a44cfdc7f08840924.
Thanks for the suggestion.
Currently to write a compile_commands.json from the output of the command you have to do this:
While this is fine for just using the plain CLI, it is problematic for automating the process in programs that do not use the shell, but call the program directly.
I think that there should be a command line option to write the output to a file, not to stdout, so writing compile_commands.json could be like this: