# Print generated command by add\_custom\_command

**URL:** https://discourse.cmake.org/t/print-generated-command-by-add-custom-command/15638
**Category:** Usage
**Tags:** os:linux
**Created:** [May 4, 2026, 10:31am UTC](https://discourse.cmake.org/t/print-generated-command-by-add-custom-command/15638 "2026-05-04T10:31:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![matdubuisson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/matdubuisson/32/6112_2.png) [@matdubuisson](https://discourse.cmake.org/u/matdubuisson)
#### Post date: [May 4, 2026, 10:31am UTC](https://discourse.cmake.org/t/print-generated-command-by-add-custom-command/15638/1 "2026-05-04T10:31:32Z")

</div>

Hello,

I have a simple question, is it possible to ask cmake to print all generated commands our I have to do it manually py setting the COMMENT option of add\_custom\_command or adding a log ?

Thank you in advance,  
Best regards,

---

<div class="post-metadata">

### Author: ![matdubuisson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/matdubuisson/32/6112_2.png) [@matdubuisson](https://discourse.cmake.org/u/matdubuisson)
#### Post date: [May 4, 2026, 10:35am UTC](https://discourse.cmake.org/t/print-generated-command-by-add-custom-command/15638/2 "2026-05-04T10:35:32Z")

</div>

Sorry I was too fast, the answer is to add `VERBOSE=1` as argument to cmake.
