I would like to iterate all my project targets with top level scripts. Then, I would like to add pre-build steps for all of them using
add_custom_command. I realize that by default in newer versions of cmake this does not work because the documentation states that
The <target> must be defined in the current directory; targets defined in other directories may not be specified.
I am tempted to set CMP0040 to allow me to do this. What might the tradeoffs or negatives aspects of me doing this? It seems like a common usage to me to what to add certain steps/configuration to multiple targets. Not sure why this functionality is being deprecated?