# Extract folders from include\_directories(SYSTEM)

**URL:** <https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303>\
**Category:** Code\
**Created:** [May 12, 2021, 4:32pm UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303 "2021-05-12T16:32:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Post date:** [May 12, 2021, 4:32pm UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303/1 "2021-05-12T16:32:21Z")

</div>

How can i read these include directories later?

They are added to directory property INCLUDE\_DIRECTORIES, but how do I know which ones where added with SYSTEM and which were not?

---

<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:** [May 12, 2021, 5:32pm UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303/2 "2021-05-12T17:32:12Z")

</div>

I think the only way is to query a target for its `SYSTEM_INCLUDE_DIRECTORIES` property and then do some set operations with the includes you’re interested in.

---

<div class="post-metadata">

**Author:** ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Post date:** [May 13, 2021, 10:52am UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303/3 "2021-05-13T10:52:29Z")

</div>

> [@ben.boeckel](#):
>
> `SYSTEM_INCLUDE_DIRECTORIES`

Can you share a link?  
I can only find INTERFACE\_SYSTEM\_INCLUDE\_DIRECTORIES and this is a target property.

---

<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:** [May 13, 2021, 12:18pm UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303/4 "2021-05-13T12:18:11Z")

</div>

Oh, that seems to be some internal thing then. So no, I don’t think there’s any available (or at least documented) API for that then. Please file [an issue](https://gitlab.kitware.com/cmake/cmake/-/issues).

---

<div class="post-metadata">

**Author:** ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Post date:** [May 17, 2021, 7:01am UTC](https://discourse.cmake.org/t/extract-folders-from-include-directories-system/3303/5 "2021-05-17T07:01:16Z")

</div>

Done: [https://gitlab.kitware.com/cmake/cmake/-/issues/22199](https://gitlab.kitware.com/cmake/cmake/-/issues/22199)
