[CMake] add_custom_command, POST_BUILD

Vladimir Chebotarev vladimir.chebotarev at gmail.com
Wed Jun 1 11:46:49 EDT 2016


Hi there.

At the moment one can add a command executing after a build of a target
using:
add_custom_command(... POST_BUILD...)

However if the command have a dependencies which build after the target,
there is practically no way to specify it.

Simple case: we have a library and tests for it. E.g. I want them to run in
POST_BUILD of a library. But, tests already depends on the library so I
can't make them built before it.

There are few possible solutions to that:
1) add possibility to set dependencies for add_custom_command in POST_BUILD
mode;
2) add possibility to populate list of targets if we have specified ones in
list.

Or maybe correct me if I miss something.

Kind regards, Vladimir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160601/252469a3/attachment-0001.html>


More information about the CMake mailing list