# Dynamic Generation of source files at configure/build time

**URL:** https://discourse.cmake.org/t/dynamic-generation-of-source-files-at-configure-build-time/10749
**Category:** Usage
**Created:** [April 26, 2024, 9:48pm UTC](https://discourse.cmake.org/t/dynamic-generation-of-source-files-at-configure-build-time/10749 "2024-04-26T21:48:34Z")
**Posts on this page:** 1
**Showing post:** 6

<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: [June 11, 2024, 5:01pm UTC](https://discourse.cmake.org/t/dynamic-generation-of-source-files-at-configure-build-time/10749/6 "2024-06-11T17:01:25Z")

</div>

> [@biddisco](#):
>
> I’d like to parallelize the generation, but the source file list is only known after generation completes.

Today, you’ll need to generate a single source that `#include`s all of the generated sources and then include that one (known) source in the target list. It isn’t the greatest with parallelism utilization, but without some other features in CMake, this is the best that is possible today.

---

_[View the full topic](https://discourse.cmake.org/t/dynamic-generation-of-source-files-at-configure-build-time/10749)._
