add_custom_command(): No error if using TARGET form without specifying POST_BUILD or its alternatives
The add_custom_command(TARGET blah ...)
form of the command requires one of PRE_BUILD
, PRE_LINK
or POST_BUILD
to be specified after the target name. However, CMake doesn't complain if you leave it out. Looking at the implementation, it looks like it defaults to POST_BUILD
. Either the docs should be updated to reflect this, or we should error out (which would require a policy).