# How to depend flags.make in the add\_custom\_command

**URL:** https://discourse.cmake.org/t/how-to-depend-flags-make-in-the-add-custom-command/1488
**Category:** Usage
**Created:** [July 4, 2020, 1:38am UTC](https://discourse.cmake.org/t/how-to-depend-flags-make-in-the-add-custom-command/1488 "2020-07-04T01:38:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lxy9527](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/8491ac/32.png) [@lxy9527](https://discourse.cmake.org/u/lxy9527)
#### Post date: [July 4, 2020, 1:38am UTC](https://discourse.cmake.org/t/how-to-depend-flags-make-in-the-add-custom-command/1488/1 "2020-07-04T01:38:51Z")

</div>

as the title ,  
I need use add\_custom\_command attach a output file to my target , and this output file need depend my\_target/flags.make,  
how can we get this direcotry ? Is there any macro?

---

<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: [November 11, 2020, 3:03pm UTC](https://discourse.cmake.org/t/how-to-depend-flags-make-in-the-add-custom-command/1488/2 "2020-11-11T15:03:14Z")

</div>

This is not possible in general because not every generator has a `flags.make` file. What are you trying to do?
