Make miss dependencies when add_custom_command depends on add_custom_target or add_custom_command

Not necessarily. Sometimes B does work, but determines that no more work needs done (e.g., the VCS information is the same as last time), so version.h is not updated. A should not rebuild in that case.