I've got a CMake-based project in which I heavily rely on FetchContent to retrive multiple libraries (source code). Downloading all the libraries may take time which I want to save when compiling on a CI runner (GitHub Actions).
I saw there's a cache action, how I can use that to cache the fetched source code?
As a bonus, It might be helpful to cache the compiled code of these fetched libraries as well. It that possible somehow?
CMake doesn't provide any such functionality.
For that reason I have developed my own solution at https://github.com/jjYBdx4IL/dlcache.
What you need to do is to replace the URL parameters with local file paths of the locally cached files. That's what https://github.com/jjYBdx4IL/dlcache-cmake is providing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With