Over the course of a few months since we started a project we realized that FetchContents
has beaten us a number of times when upstream projects that we depend on rewrote git history, added a few commits on top of their main branch (and we used GIT_SHALLOW ON
, so FetchContents
wasn’t able to find anything), …
I would like to be able to create a “self-contained fat tarball” that would pre-fetch all dependencies and pack them together with our source code into a tarball that could be compiled any time in the future, independent of whether or not the upstream sources still exist at their original location.
When using git sumbodules that can easily be achieved by recursively fetching all the submodules, but it seems somewhat more tricky to achieve the same with FetchContents
.