# Does CMake use Ninja's \`dyndep\` feature for C++20 modules?

**URL:** https://discourse.cmake.org/t/does-cmake-use-ninjas-dyndep-feature-for-c-20-modules/10185
**Category:** Development
**Created:** [February 25, 2024, 3:01pm UTC](https://discourse.cmake.org/t/does-cmake-use-ninjas-dyndep-feature-for-c-20-modules/10185 "2024-02-25T15:01:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RobN](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@RobN](https://discourse.cmake.org/u/RobN)
#### Post date: [February 25, 2024, 3:01pm UTC](https://discourse.cmake.org/t/does-cmake-use-ninjas-dyndep-feature-for-c-20-modules/10185/1 "2024-02-25T15:01:20Z")

</div>

While doing some work with Ninja, I noticed this section of their docs on [Dynamic Dependencies](https://ninja-build.org/manual.html#ref_dyndep). That seems ideal for C++20 modules, but I didn’t think CMake used it. Does it?

I’m just curious how things worked.

---

<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 26, 2024, 1:04am UTC](https://discourse.cmake.org/t/does-cmake-use-ninjas-dyndep-feature-for-c-20-modules/10185/2 "2024-02-26T01:04:29Z")

</div>

Yes, it is used for C++ modules. It was originally contributed by @brad.king to support Fortran module compilation; C++ module compilation is isomorphic in the build graph operations required for a correct build (but obviously different in the details).
