# Run tool automatically after generation phase

**URL:** <https://discourse.cmake.org/t/run-tool-automatically-after-generation-phase/13132>\
**Category:** Usage\
**Created:** [December 5, 2024, 11:59am UTC](https://discourse.cmake.org/t/run-tool-automatically-after-generation-phase/13132 "2024-12-05T11:59:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)\
**Post date:** [December 6, 2024, 11:32am UTC](https://discourse.cmake.org/t/run-tool-automatically-after-generation-phase/13132/3 "2024-12-06T11:32:07Z")

</div>

This by far [not](https://gitlab.kitware.com/cmake/cmake/-/issues/15725) the [first](https://gitlab.kitware.com/cmake/cmake/-/issues/13020) request (disclaimer: one of them’s mine) for supporting a post-generation hook. Wrappers are cumbersome. Would CMake developers be willing to re-consider the policy of “we don’t want to support user-defined post-generation processing,” at least if it came with a big warning “It may break if we change the way we produce output, you’ve been warned”?

I understand projects “in the wild” need to cope with being processed by unexpected versions of CMake, but CMake is also used by companies for in-house software development. There, environments (including CMake version) are much more controlled, so adapting to a change in CMake’s output behaviour is easier. At the same time, special requirements which would benefit from a post-generation step are much more likely to exist (as follows from the same existence of the usually quite bespoke environment).

I can accept the answer remaining “no,” but I thought I’d at least raise the question again.

---

_[View the full topic](https://discourse.cmake.org/t/run-tool-automatically-after-generation-phase/13132)._
