Perceived issue with FetchContent
In a multi configuration build e.g. Windows+Android+Linux any fetched repository is Clone separately into every build folder.
- Duplicate bandwidth for download/update of each configuration
- Duplicate storage use on disk of each configuration
Current State
-
FETCHCONTENT_BASE_DIR
can be used to change ALL directories which is not workable as this means thatbuild
folders are also shared erroneously.
Concept of a Solution
If the FetchContent
supported a FETCHCONTENT_SOURCE_BASE_DIR
override then all configurations could place the src into the same configured directory.
Extending of Solution
If a out-of-build folder e.g. User-Home location is used for source then there could be a centralised storage of FetchContent
modules on a users computer.
- These could allow ‘always offline’ to still work after a ‘clean’ operation has occured
- This doens’t consider how/if multiple versions of the same module should be catered for, however it is the users choice to set the SOURCE_BASE_DIR