Is there any plans to add a support for user-specified "include" search path?
I have a project, which I try to compile in Arduino IDE. Project uses its own include directory. Can we just set it somewhere in the IDE and do not change every #include "file.h" to #include "d:/Arduino/AbsolutePath/file.h" ?
This and many other problems can be solved just by adding a "custom command line parameters for GCC and LD". One textinput field under "Preferences".
I do not know if this is what you're looking for and I don't know if you are aware of this but the IDE (or the underlaying CLI) does support a src directory under the sketch directory.
You can create the src directory in your sketch directory and in there create one or more directories with files that need to be compiled.
I understand that this is a request; if so, you can log a feature request on github; I think the best place would be Issues · arduino/arduino-cli · GitHub.
You are aware that you can hack the platform.txt file to modify the parameters? It's not the most convenient way and you have to be careful that any update / downgrade of a board package will wipe the change.
The other important factor is that building the sketch will also build all those modules, included or not -- file.cpp, x.c, y.cpp -- and then link all the results together with the results of the .ino
--libraries strings Path to a collection of libraries. Can be used multiple times or entries can be comma separated.
--library strings Path to a single library’s root folder. Can be used multiple times or entries can be comma separated.
Unfortunately, Arduino IDE does not currently recognize the sketch project file where the build profile is defined (arduino/arduino-ide#2573). However, this capability can be added to Arduino IDE by installing the 3rd party Arduino Sketch Vault extension: