# FetchContent & CMP0135

**URL:** <https://discourse.cmake.org/t/fetchcontent-cmp0135/10422>\
**Category:** Code\
**Created:** [March 20, 2024, 1:19pm UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422 "2024-03-20T13:19:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oodini](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/db5fbb/32.png) [@Oodini](https://discourse.cmake.org/u/Oodini)\
**Post date:** [March 20, 2024, 1:19pm UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422/1 "2024-03-20T13:19:23Z")

</div>

Hello,

In **Professional CMake 17th** , I read some stuff about [CMP0135](https://cmake.org/cmake/help/latest/policy/CMP0135.html). The book and the documentation talk only about `ExternalProject_Add()`, but not about `FetchContent`.

And then I found the following ticket :  
[https://gitlab.kitware.com/cmake/cmake/-/issues/23560](https://gitlab.kitware.com/cmake/cmake/-/issues/23560)  
and the followoing merge request :  
[https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/7316/](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7316/)  
both made by @craig.scott

The merge request seems to be done, but as there is no mention of `FetchContent` in the two documentation sources mentionned above, I was wondering if CMP0135 was considered by `FetchContent` ?

Thanks.

---

<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:** [March 20, 2024, 9:19pm UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422/2 "2024-03-20T21:19:05Z")

</div>

Yes CMP0135 should apply to FetchContent as well. I’ll take a look at updating the CMP0135 docs to make that clear when I get a chance.

---

<div class="post-metadata">

**Author:** ![Oodini](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/db5fbb/32.png) [@Oodini](https://discourse.cmake.org/u/Oodini)\
**Post date:** [March 21, 2024, 8:05am UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422/3 "2024-03-21T08:05:03Z")

</div>

OK, thank you.

---

<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:** [April 27, 2024, 1:06am UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422/4 "2024-04-27T01:06:31Z")

</div>

Docs are being updated in this merge request: [https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/9470](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9470)

---

<div class="post-metadata">

**Author:** ![Oodini](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/db5fbb/32.png) [@Oodini](https://discourse.cmake.org/u/Oodini)\
**Post date:** [April 29, 2024, 9:29am UTC](https://discourse.cmake.org/t/fetchcontent-cmp0135/10422/5 "2024-04-29T09:29:09Z")

</div>

Thank you !
