Fetch Content Source Cache

I want to use FetchContent to manage my dependencies at work.

However, there is a problem with vanilla FetchContent that CPM provides CPM_SOURCE_CACHE (https://github.com/TheLartians/CPM.cmake#cpm_source_cache)

Quite honestly this one env. variable drastically improves everything. It speeds up CI and developer workflows.

I was wondering if the cmake developers would consider adding this one feature. It’s such quality of life, and I can’t imagine it’s much work to add.

1 Like

Thanks for the info. I’m open to the idea, but I have some fairly significant work underway for FetchContent and I need that to take priority for now. That work may also affect how something like this could be implemented or what constraints may be needed around it, so I would like to get that work out for feedback first before attacking this one.

2 Likes

I have tested and worked with CPM.cmake

It is really a great improvement!

see for example https://github.com/ClausKlein/ModernCppStarter/blob/develop/GNUmakefile
you may easy test the different with this example project