# The VERIFY\_INTERFACE\_HEADER\_SETS must not always enabled?

**URL:** <https://discourse.bemanproject.org/t/the-verify-interface-header-sets-must-not-always-enabled/560>\
**Category:** Beman Libraries\
**Tags:** cmake\
**Created:** [February 16, 2026, 10:09pm UTC](https://discourse.bemanproject.org/t/the-verify-interface-header-sets-must-not-always-enabled/560 "2026-02-16T22:09:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClausKlein](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/clausklein/32/136_2.png) [@ClausKlein](https://discourse.bemanproject.org/u/ClausKlein)\
**Post date:** [February 16, 2026, 10:09pm UTC](https://discourse.bemanproject.org/t/the-verify-interface-header-sets-must-not-always-enabled/560/1 "2026-02-16T22:09:16Z")

</div>

```auto
set_target_properties(beman.exemplar PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON)

```

should be

```auto
set_target_properties(beman.exemplar PROPERTIES VERIFY_INTERFACE_HEADER_SETS ${PROJECT_IS_TOP_LEVEL})

```

and it should not be enabled if CXX\_MODULES are compiled?

```auto
if(BOOST_USE_MODULES)

    # Ensure CMAKE_CXX_STANDARD is set for module detection
    if(NOT DEFINED CMAKE_CXX_STANDARD)
        set(CMAKE_CXX_STANDARD 20)
    endif()

    add_library(boost_any)

    target_sources(
        boost_any
        PUBLIC
            FILE_SET modules_public
                TYPE CXX_MODULES
                FILES modules/boost_any.cppm
    )

    # Require C++20 for modules
    target_compile_features(boost_any PUBLIC cxx_std_${CMAKE_CXX_STANDARD})

    # Define macro indicating modules usage
    target_compile_definitions(boost_any PUBLIC BOOST_USE_MODULES)

    # Check if import std; is available for the current standard
    if(${CMAKE_CXX_STANDARD} IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD)
        target_compile_definitions(boost_any PUBLIC BOOST_ANY_USE_STD_MODULE)
        set_property(TARGET boost_any CXX_MODULE_STD ON)
        message(STATUS "Boost.Any: Using `import std;`")
    else()
        message(WARNING "Boost.Any: `import std;` is not available for C++${CMAKE_CXX_STANDARD}")
    endif()

    set(__scope PUBLIC)

else()

    # Modules disabled -> INTERFACE library
    add_library(boost_any INTERFACE)

    # If modules are disabled, require C++17 for headers
    target_compile_features(boost_any INTERFACE cxx_std_17)

    # Verify interface headers only at top level
    if(PROJECT_IS_TOP_LEVEL)
        set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ON)
    endif()

    set(__scope INTERFACE)

endif()

```

---

<div class="post-metadata">

**Author:** ![ednolan](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/ednolan/32/131_2.png) [@ednolan](https://discourse.bemanproject.org/u/ednolan)\
**Post date:** [March 14, 2026, 9:37pm UTC](https://discourse.bemanproject.org/t/the-verify-interface-header-sets-must-not-always-enabled/560/2 "2026-03-14T21:37:25Z")

</div>

> <https://github.com/bemanproject/exemplar/pull/303>
>
> \### see targets list of \`ninja help\` on \`beman.net\` project:
> 
> \`\`\`
> beman.execu…tion: phony
> beman.execution\_headers: phony
> beman.execution\_headers\_verify\_interface\_header\_sets: phony
> beman.net\_headers: phony
> beman.net\_headers\_verify\_interface\_header\_sets: phony
> beman.task: phony
> beman.task\_headers: phony
> beman.task\_headers\_verify\_interface\_header\_sets: phony
> libbeman.execution.a: phony
> libbeman.task.a: phony
> sorted\_list.pass: phony
> \`\`\`
> 
> see https://discourse.bemanproject.org/t/the-verify-interface-header-sets-must-not-always-enabled/560

Thank you for this pull request. It’s now been merged into exemplar.
