# Why doesn't \`--workflow\` support multiple configure stages?

**URL:** https://discourse.cmake.org/t/why-doesnt-workflow-support-multiple-configure-stages/10192
**Category:** Development
**Created:** [February 26, 2024, 11:49am UTC](https://discourse.cmake.org/t/why-doesnt-workflow-support-multiple-configure-stages/10192 "2024-02-26T11:49:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alex/32/125_2.png) [@alex](https://discourse.cmake.org/u/alex)
#### Post date: [February 26, 2024, 11:49am UTC](https://discourse.cmake.org/t/why-doesnt-workflow-support-multiple-configure-stages/10192/1 "2024-02-26T11:49:37Z")

</div>

I was trying to answer a question on StackOverflow about how to effectively accomplish PGO using Clang. The manual workflow is typically to compile once with `-fprofile-generate` and then again with `-fprofile-use` after running a representative sample of your application’s functionality.

I thought it would be useful to drive this using a CMake preset workflow:

1. Configure the project with `-fprofile-generate`
2. Build the project
3. Run the tests marked with the `performance` label
4. Configure the project _again_ with `-fprofile-use`
5. Build the project again

But CMake rejects this saying that only one configure step is allowed. Why is that? It seems like it would be useful to support doing something like what I outline above.

Here’s a link to my SO answer in case you want to repro this quickly: [c++ - How can I express PGO dependencies in CMake 3.7 and higher? - Stack Overflow](https://stackoverflow.com/a/78060164/2137996)

---

<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 27, 2024, 2:27pm UTC](https://discourse.cmake.org/t/why-doesnt-workflow-support-multiple-configure-stages/10192/2 "2024-02-27T14:27:47Z")

</div>

Cc: @kyle.edwards
