# Presets and \_deps folder question

**URL:** https://discourse.cmake.org/t/presets-and-deps-folder-question/6768
**Category:** Usage
**Created:** [November 1, 2022, 4:07pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768 "2022-11-01T16:07:01Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Rich\_von\_Lehe](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rich_von_lehe/32/307_2.png) [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)
#### Post date: [November 1, 2022, 4:07pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/1 "2022-11-01T16:07:01Z")

</div>

I’m looking for a good link to any specific part of the documentation that talks about when the \_deps folder might be wiped out. I’ve had a number of coworkers who like to use presets from within their IDE and in doing this they seem to be wiping out their \_deps folder each time. I suspect there is a way to avoid this, but I don’t fully understand why \_deps would be getting wiped out in the first place if you’re just repeatedly calling CMake with the same parameters. There are implications for the people doing this - i.e. fetch times are added to each call they make to CMake instead of just the first call.

EDIT: I should say that the \_deps folder is getting _repopulated_ - i.e. any FetchContent calls in the CMake project get executed as if the \_deps folder did not already exist when it did in fact exist.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 1, 2022, 8:10pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/2 "2022-11-01T20:10:47Z")

</div>

`_deps` is not a standard CMake thing, so where is this coming from in the first place?

---

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [November 1, 2022, 8:18pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/3 "2022-11-01T20:18:18Z")

</div>

FetchContent creates that folder. It’s usually in the build directory, so it usually gets deleted only if you delete the entire build tree.

---

<div class="post-metadata">

### Author: ![Rich\_von\_Lehe](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rich_von_lehe/32/307_2.png) [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)
#### Post date: [November 1, 2022, 8:23pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/4 "2022-11-01T20:23:32Z")

</div>

Apologies - perhaps it’s not standard, but I noticed that FetchContent uses it for any fetched content that gets pulled in. Perhaps the name of the folder isn’t always the same - that’s just what I’ve seen on Windows.

---

<div class="post-metadata">

### Author: ![Rich\_von\_Lehe](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rich_von_lehe/32/307_2.png) [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)
#### Post date: [November 1, 2022, 8:27pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/5 "2022-11-01T20:27:22Z")

</div>

I’ll get an example sequence that reproduces the issue. I realize this question is a bit incomplete without that.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 1, 2022, 8:33pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/6 "2022-11-01T20:33:45Z")

</div>

Oh, if it’s `FetchContent` stuff…beyond my knowledge of the module. @craig.scott?

---

<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: [November 1, 2022, 11:09pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/7 "2022-11-01T23:09:43Z")

</div>

FetchContent puts all its stuff under `${CMAKE_BINARY_DIR}/_deps` by default. That location is controlled by the `FETCHCONTENT_BASE_DIR` variable (I would advise against changing it from its default).

You’d need to show what your `FetchContent_Declare()` calls are before I could comment further on why things might be getting repopulated on every CMake run.

---

<div class="post-metadata">

### Author: ![Rich\_von\_Lehe](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rich_von_lehe/32/307_2.png) [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)
#### Post date: [November 3, 2022, 7:09pm UTC](https://discourse.cmake.org/t/presets-and-deps-folder-question/6768/8 "2022-11-03T19:09:52Z")

</div>

Apologies. After some further investigation I couldn’t reproduce my coworkers’ problems with CMake alone. It is a function of their IDE or IDE settings (Visual Studio). My bad.
