# VERIFY\_INTERFACE\_HEADER\_SETS grouping in folders

**URL:** https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092
**Category:** Usage
**Created:** [May 10, 2023, 7:56am UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092 "2023-05-10T07:56:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![duncanspumpkin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/duncanspumpkin/32/3423_2.png) [@duncanspumpkin](https://discourse.cmake.org/u/duncanspumpkin)
#### Post date: [May 10, 2023, 7:57am UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092/1 "2023-05-10T07:57:00Z")

</div>

I was planning on using VERIFY\_INTERFACE\_HEADER\_SETS to replace custom equivalent code. But one thing I’ve noticed is that the targets generated ${TARGET}\_verify\_interface\_header\_sets don’t appear to be valid targets that you can apply properties to. I would like to be able to group all of the \_verify\_interface\_header\_sets into a folder on its own in my IDE. `set_target_properties(${TARGET}_verify_interface_header_sets PROPERTIES FOLDER "Header Checkers")`. Is there a way to do this? If its not possible its not the end of the world since really its only the CI that will ever enable the header verify but I like to keep things neat for when checking CI issues.

---

<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: [May 10, 2023, 11:08am UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092/2 "2023-05-10T11:08:24Z")

</div>

@kyle.edwards

---

<div class="post-metadata">

### Author: ![johnfranklin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/e47c2d/32.png) [@johnfranklin](https://discourse.cmake.org/u/johnfranklin)
#### Post date: [January 10, 2024, 3:15pm UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092/3 "2024-01-10T15:15:35Z")

</div>

Hello. I want to answer on this topic, as it is somewhat related to mine and the first one I found.

We want to compile specific generated tests with C++14 which would also involve setting information/properties on the target.

I tried something like this:

```auto
add_library(TestTarget INTERFACE)
target_sources(TestTarget
	PUBLIC FILE_SET HEADERS
	TYPE HEADERS
	FILES ${some_headers}	)
target_compile_features(TestTarget INTERFACE cxx_std_14)
set_target_properties(TestTarget PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

```

But sadly the test does not try to run the lowest possible compiler flag for the header fileset.

I would therefore also be interested in accessing generated test targets, or at least adding some compile definitions for them.

---

<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: [January 11, 2024, 1:57pm UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092/4 "2024-01-11T13:57:05Z")

</div>

> [@duncanspumpkin](#):
>
> Is there a way to do this?

Probably not as, I believe, the targets are made during generation time.

> [@johnfranklin](#):
>
> But sadly the test does not try to run the lowest possible compiler flag for the header fileset.

You mean you want the `cxx_std_14` to be applied to the header test even if something else brings in the `cxx_std_17` compile feature? I don’t believe there is a mechanism for that.

I’m not sure of the best way to allow access to these targets though. Maybe some `cmake_language(DEFER)` can access them somehow? Cc: @brad.king

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [January 11, 2024, 2:06pm UTC](https://discourse.cmake.org/t/verify-interface-header-sets-grouping-in-folders/8092/5 "2024-01-11T14:06:49Z")

</div>

`cmake_language(DEFER)` still runs at configure time. The “verify” targets are created after configuration is done so there is no way for `.cmake` code to access them.

Instead we could consider a companion property to `VERIFY_INTERFACE_HEADER_SETS` that can be used to set the `FOLDER` property of the generated target.
