Current situation:
- A C++ library which sits between the application and IDF.
- 19 (test) projects using the library.
Due to how the ESP-IDF build system has been implemented, it cannot build more than a single executable target which forces me to recompile IDF and the library for each of those 19 projects. Currently, this takes ~70 minutes, which is unacceptable.
Had this been a regular CMake system, I'd simply tell CMake to reuse the library for each project (via target_link_library), but its not so I can't.
There is however a library.a file being created and directly linking to that in the 19 projects does appear to work, but are there any pitfalls in doing so, except breaking the dependency chain?
I'd rather not break the dependency chain as that likely means I have to handle menuconfig etc manually. Is there a better way?
~Rant mode on~
The more I work with ESP-IDF's implementation of components etc, the more I which it followed standard modern CMake instead of the component-based abomination we now have. Why was regular CMake not enough? Imho, the component idea was a mistake, it makes things way harder than they need to be.
~End rant~
Reusing a component as a library when linking to reduce build times.
Re: Reusing a component as a library when linking to reduce build times.
FWIW, I ended up scripting the builds so that it adjusts the CMakeLists.txt file to change the target project which resulted in a 50 minute run time reductions.
Who is online
Users browsing this forum: Google [Bot] and 107 guests