I think the answer from @ivankravets in another post brings me a little closer to the answer:
PlatformIO uses chain+ mode for library.properties dependencies.
[It] parses ALL C/C++ source files of the project and follows only by nested includes (#include ...
, chain…) from the libraries. It also parses C, CC, CPP files from libraries which have the same name as included header file.
Does this means that, similarly to the project’s files in the /src
folder, all source files inside the library’s root directory are also parsed?
Consider the following scenario:
- my
main.cpp
has#include <Adafruit_GFX.h>
- Adadruit GFX library has the structure illustrated in my first post
Will Adafruit_GrayOLED.cpp
be parsed even thought #include <Adafruit_GFX.h>
is not found anywhere in the library’s contents, in my main.cpp
or in my lib_deps
?