# /showIncludes option added automatically

**URL:** https://discourse.cmake.org/t/showincludes-option-added-automatically/6706
**Category:** Usage
**Tags:** os:windows, gen:ninja
**Created:** [October 21, 2022, 2:22pm UTC](https://discourse.cmake.org/t/showincludes-option-added-automatically/6706 "2022-10-21T14:22:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![serge](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/5f8ce5/32.png) [@serge](https://discourse.cmake.org/u/serge)
#### Post date: [October 21, 2022, 2:22pm UTC](https://discourse.cmake.org/t/showincludes-option-added-automatically/6706/1 "2022-10-21T14:22:10Z")

</div>

Hi everyone,

I am using cmake 3.23 with Ninja generator on Windows.  
clang-cl compiler is in use.

Somehow I can see in the build log that /showIncludes has been added project wide as a compilation flag and not by our cmake code.  
Where does it come from?

After doing some search I can see the following in file: “C:\Program Files\CMake\share\cmake-3.22\Modules\Platform\Windows-Intel-CXX.cmake”

if(“${CMAKE\_SOURCE\_DIR}${CMAKE\_BINARY\_DIR}” MATCHES " ")  
set(CMAKE\_DEPFILE\_FLAGS\_CXX “/showIncludes”)  
set(CMAKE\_CXX\_DEPFILE\_FORMAT msvc)  
endif()

Does it have something to do?

Thanks,  
Serge

---

<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: [October 21, 2022, 2:27pm UTC](https://discourse.cmake.org/t/showincludes-option-added-automatically/6706/2 "2022-10-21T14:27:58Z")

</div>

Yes, it’s how Ninja knows of all headers that are included for each compile so that it knows which files to keep an eye on to know when it needs to rerun compilations when they change.

---

<div class="post-metadata">

### Author: ![serge](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/5f8ce5/32.png) [@serge](https://discourse.cmake.org/u/serge)
#### Post date: [October 21, 2022, 3:31pm UTC](https://discourse.cmake.org/t/showincludes-option-added-automatically/6706/3 "2022-10-21T15:31:53Z")

</div>

Ok thanks Ben.
