[CMake] COMMAND dependencies with add_custom_command()

Craig Scott craig.scott at crascit.com
Wed Jan 25 20:25:36 EST 2017


The documentation for add_custom_command() contains this little nugget when
discussing the COMMAND keyword:

If COMMAND specifies an executable target name ...<snip>... Additionally a
> target-level dependency will be added so that the executable target will be
> built before any target using this custom command. However this does NOT
> add a file-level dependency that would cause the custom command to re-run
> whenever the executable is recompiled.


I'm struggling to come up with a scenario where that last part about file
level dependencies becomes relevant. Can anyone come up with a simple use
case which highlights that particular aspect of dependencies and commands?


-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170126/e6e93cc8/attachment.html>


More information about the CMake mailing list