[CMake] clean custom_target

Tiago Macarios tiagomacarios at gmail.com
Tue Oct 25 22:36:11 EDT 2016


Hi,

Is there a way to have a command to be run during a clean?

I have a custom_target which does a fair bit of things and it also has the
ability to clean up after itself. So conceptually something like this is
what I am looking for:

add_custom_target(Name ALL
    COMMAND command
    COMMAND_CLEAN command -clean
)


Tiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161025/bd5b867a/attachment.html>


More information about the CMake mailing list