# Header-only libraries and C++20 modules

**URL:** https://discourse.cmake.org/t/header-only-libraries-and-c-20-modules/10680
**Category:** Usage
**Created:** [April 17, 2024, 9:46am UTC](https://discourse.cmake.org/t/header-only-libraries-and-c-20-modules/10680 "2024-04-17T09:46:06Z")
**Posts on this page:** 1
**Showing post:** 3

<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 17, 2024, 5:47pm UTC](https://discourse.cmake.org/t/header-only-libraries-and-c-20-modules/10680/3 "2024-04-17T17:47:52Z")

</div>

Modules have module initializer symbols that need to be provided once to be reliable (the ODR applies here). Providing it in a library is the reliable way to do this.

> [@anarthal](#):
>
> as the modules will be built again by the consumer

The BMIs will be built again, but not object files.

---

_[View the full topic](https://discourse.cmake.org/t/header-only-libraries-and-c-20-modules/10680)._
