[CMake] custom_command pre_build vs. post_build

Brad King brad.king at kitware.com
Wed Sep 20 12:45:56 EDT 2006


Richard Fuchs wrote:
> Ah, I see the note now.  It's not in the section of the cmake book that
> describes the command, but it's in the command index in the back and on
> the web.
> So why does it work with the add_custom_target?

It doesn't AFAIK.  The custom rule specified by the custom target is put
at the beginning of the post-build rules list.  Therefore the pre-build
rules do run before it.  However if there are any custom commands in the
target (using the DEPENDS argument of ADD_CUSTOM_COMMAND) I think they
will still run first.

-Brad


More information about the CMake mailing list