# git and generate\_export\_header

**URL:** https://discourse.cmake.org/t/git-and-generate-export-header/7869
**Category:** Usage
**Created:** [April 10, 2023, 4:45pm UTC](https://discourse.cmake.org/t/git-and-generate-export-header/7869 "2023-04-10T16:45:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adaldev](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@adaldev](https://discourse.cmake.org/u/adaldev)
#### Post date: [April 10, 2023, 4:45pm UTC](https://discourse.cmake.org/t/git-and-generate-export-header/7869/1 "2023-04-10T16:45:18Z")

</div>

Hi,

I’m just looking for an advice: should I gitignore files generated by generate\_export\_header?  
How can I document the fact that my sources are including a file that must first be generated?

Thanks  
A.

---

<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: [April 24, 2023, 4:57am UTC](https://discourse.cmake.org/t/git-and-generate-export-header/7869/2 "2023-04-24T04:57:03Z")

</div>

Usually you generate them to the build directory and there’s no need to exclude them. They’re “documented” by adding the build dir to your `PUBLIC` include directories (as a build interface).

---

<div class="post-metadata">

### Author: ![adaldev](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@adaldev](https://discourse.cmake.org/u/adaldev)
#### Post date: [April 24, 2023, 7:53am UTC](https://discourse.cmake.org/t/git-and-generate-export-header/7869/3 "2023-04-24T07:53:38Z")

</div>

Hi  
It does not match my include files organisation but thanks for the advice anyway.

Regards  
A.
