# CMAKE\_INCLUDE\_CURRENT\_DIR\_IN\_INTERFACE does not add the current folder as a target property

**URL:** https://discourse.cmake.org/t/cmake-include-current-dir-in-interface-does-not-add-the-current-folder-as-a-target-property/3880
**Category:** Usage
**Created:** [August 5, 2021, 5:43am UTC](https://discourse.cmake.org/t/cmake-include-current-dir-in-interface-does-not-add-the-current-folder-as-a-target-property/3880 "2021-08-05T05:43:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![laszlo](https://discourse.cmake.org/user_avatar/discourse.cmake.org/laszlo/32/1687_2.png) [@laszlo](https://discourse.cmake.org/u/laszlo)
#### Post date: [August 5, 2021, 5:43am UTC](https://discourse.cmake.org/t/cmake-include-current-dir-in-interface-does-not-add-the-current-folder-as-a-target-property/3880/1 "2021-08-05T05:43:08Z")

</div>

Hey all,

the cmake documentation [says](https://cmake.org/cmake/help/v3.17/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.html):

> If this variable is enabled, CMake automatically adds for each shared library target, static library target, module target and executable target, CMAKE\_CURRENT\_SOURCE\_DIR and CMAKE\_CURRENT\_BINARY\_DIR to the INTERFACE\_INCLUDE\_DIRECTORIES target property.

So I made a little test:

```auto
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
PROJECT(includetest)
INCLUDE(CMakePrintHelpers)
#Set the variables
SET(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) 
ADD_EXECUTABLE(main main.cpp)
#Print out INTERFACE_INCLUDE_DIRECTORIES                                                                                                                                                                                      
CMAKE_PRINT_PROPERTIES(TARGETS main PROPERTIES INTERFACE_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)

```

I would expect that after running cmake on this CMakeLists.txt, it would print me out the directory where `main` is located. Instead, the output is:

```auto
 Properties for TARGET main:                                                                                                                                                                                       
   main.INTERFACE_INCLUDE_DIRECTORIES = <NOTFOUND>                                                                                                                                                                 
   main.INCLUDE_DIRECTORIES = <NOTFOUND>

```

Which is not what is expected, and rather inconsistent with what the documentation says. Or did I miss something from the docs?

I am using CMake 3.16.3
