# Two questions

**URL:** https://discourse.cmake.org/t/two-questions/6413
**Category:** Code
**Created:** [September 5, 2022, 9:14am UTC](https://discourse.cmake.org/t/two-questions/6413 "2022-09-05T09:14:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gonzalo\_Garramuno](https://discourse.cmake.org/user_avatar/discourse.cmake.org/gonzalo_garramuno/32/265_2.png) [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)
#### Post date: [September 5, 2022, 9:14am UTC](https://discourse.cmake.org/t/two-questions/6413/1 "2022-09-05T09:14:38Z")

</div>

1. How do I print the values of include\_directories() inside a CMakeLists.txt file? I’ve been trying with get\_property with no success.
2. How do I pass down the directories specified in include\_directories down to a subdirectory project ( a git submodule )?

```auto
CMakeLists.txt
    git-submodule/
         CMakeLists.txt # sets project(library), seems to reset 
                          # include_directories

```

---

<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: [September 5, 2022, 8:14pm UTC](https://discourse.cmake.org/t/two-questions/6413/2 "2022-09-05T20:14:46Z")

</div>

> [@Gonzalo\_Garramuno](#):
>
> How do I print the values of include\_directories() inside a CMakeLists.txt file? I’ve been trying with get\_property with no success.

They’re added to the directory property [`INCLUDE_DIRECTORIES`](https://cmake.org/cmake/help/latest/prop_dir/INCLUDE_DIRECTORIES.html).

> [@Gonzalo\_Garramuno](#):
>
> How do I pass down the directories specified in include\_directories down to a subdirectory project ( a git submodule )?

They’re inherited.

```cmake
include_directories(a)
add_subdirectory(d) # will include a, but not b
include_subdirectories(b)

```
