# Tutorial Step 9 missing rational for FILE\_SET HEADERS in export?

**URL:** https://discourse.cmake.org/t/tutorial-step-9-missing-rational-for-file-set-headers-in-export/15427
**Category:** Code
**Created:** [December 30, 2025, 9:39pm UTC](https://discourse.cmake.org/t/tutorial-step-9-missing-rational-for-file-set-headers-in-export/15427 "2025-12-30T21:39:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![codefrog](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/22d042/32.png) [@codefrog](https://discourse.cmake.org/u/codefrog)
#### Post date: [December 30, 2025, 9:39pm UTC](https://discourse.cmake.org/t/tutorial-step-9-missing-rational-for-file-set-headers-in-export/15427/1 "2025-12-30T21:39:50Z")

</div>

I’m newly going through the updated Tutorial. It’s much improved.

After completing exercise 2 I tried to build but got this error:

```auto
CMake Error at CMakeLists.txt:49 (install):
install TARGETS target MathFunctions is exported but not all of its
interface file sets are installed

```

A bit lost, I looked at the solution. It showed I needed to add `FILE_SET HEADERS`.

However, I could **not** see in ‘Step 9: Installation Commands and Concepts’ any reference to using ‘FILE\_SET HEADERS’ when exporting targets. The example given is:

```auto
install(
  TARGETS MyApp MyLib
  EXPORT MyProjectTargets
)

```

The solution has the form:

```auto
install(
  TARGETS MyApp MyLib
  EXPORT MyProjectTargets
  FILE_SET HEADERS
)

```

I see that in the reference documentation that ‘install(TARGETS)’ can take ‘artifact-kinds’ including FILE\_SET. But it would not occur to me (a beginner) that you _ **have to** _ export it.  
There’s no mention of this in the introductory text in this tutorial step.

If CMake thinks I’ve made a mistake by omitting ‘FILE\_SET HEADERS’, then why is that not just added by default? What if I don’t want to export those HEADERS, just the executable, and the library file (as some private library used by the executable)?

---

<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: [February 9, 2026, 5:32am UTC](https://discourse.cmake.org/t/tutorial-step-9-missing-rational-for-file-set-headers-in-export/15427/2 "2026-02-09T05:32:35Z")

</div>

@vito.gamberini or @Vito_Gamberini

---

<div class="post-metadata">

### Author: ![vito.gamberini](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vito.gamberini/32/4376_2.png) [@vito.gamberini](https://discourse.cmake.org/u/vito.gamberini)
#### Post date: [February 9, 2026, 12:10pm UTC](https://discourse.cmake.org/t/tutorial-step-9-missing-rational-for-file-set-headers-in-export/15427/3 "2026-02-09T12:10:54Z")

</div>

The tutorial shows the `FILE_SET` where and when it is needed. If the target has no interface `FILE_SET`, there is no need to list them.

Ie, [https://cmake.org/cmake/help/latest/guide/tutorial/Installation%20Commands%20and%20Concepts.html#exercise-1-installing-artifacts](https://cmake.org/cmake/help/latest/guide/tutorial/Installation%20Commands%20and%20Concepts.html#exercise-1-installing-artifacts)
