How to depend flags.make in the add_custom_command

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?

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