# Fetch Content Source Cache

**URL:** https://discourse.cmake.org/t/fetch-content-source-cache/2402
**Category:** Development
**Tags:** gen:ninja
**Created:** [December 21, 2020, 1:15am UTC](https://discourse.cmake.org/t/fetch-content-source-cache/2402 "2020-12-21T01:15:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anon45792294](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anon45792294](https://discourse.cmake.org/u/anon45792294)
#### Post date: [December 21, 2020, 1:15am UTC](https://discourse.cmake.org/t/fetch-content-source-cache/2402/1 "2020-12-21T01:15:31Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [December 21, 2020, 9:56am UTC](https://discourse.cmake.org/t/fetch-content-source-cache/2402/2 "2020-12-21T09:56:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [February 17, 2021, 9:52pm UTC](https://discourse.cmake.org/t/fetch-content-source-cache/2402/3 "2021-02-17T21:52:45Z")

</div>

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](https://github.com/ClausKlein/ModernCppStarter/blob/develop/GNUmakefile)  
you may easy test the different with this example project
