I've used irony-mode many times in projects where each file can be compiled individually with no issues. Now I am trying to use it in a project that can only be compiled from one file. There are multiple files in the projct, foo.c, bar.c, etc... and one main.c that #includes all of the other files and all dependencies (while none of the other files #include anything).
This works great when editing main.c but it fails when editing other files in the project because they don't understand that all the includes are in main.c.
I've tried editing the compile_commands.json to specifically compile main.c on each individual file, but it seems to drop that part of the command when I look at irony-cdb-menu.
I've used irony-mode many times in projects where each file can be compiled individually with no issues. Now I am trying to use it in a project that can only be compiled from one file. There are multiple files in the projct,
foo.c
,bar.c
, etc... and onemain.c
that#include
s all of the other files and all dependencies (while none of the other files#include
anything).This works great when editing
main.c
but it fails when editing other files in the project because they don't understand that all the includes are inmain.c
.I've tried editing the
compile_commands.json
to specifically compilemain.c
on each individual file, but it seems to drop that part of the command when I look atirony-cdb-menu
.Is there a way I can make this work correctly?