How to force trigger postbuild event

I have a postbuild type add_custom_command for copying some files on every successful build. Sometimes, only the files to be copied are updated, so the target won’t be rebuilt, thus the postbuild event won’t happen. So the updated files won’t be copied. Is there any graceful way to make the postbuild event “depend on” the files to be copied so that when any of them is updated, the postbuild event will happen?


I think you can make the target depend on them with add_dependency.