[CMake] Run/build custom command/target only when "input" files change
Rolf Eike Beer
eike at sf-mail.de
Tue Mar 8 05:53:18 EST 2011
> Hi
>
> I have created a custom command that generates source code for me.
>
> There is a slight annoyance still, the command is excecuted every single
> time i tell the compiler to build.
>
> Can I make it so that it runs the program only when the source file
> changes or the target file doesn't exist?
>
> I looked at the documentation for add_custom_command and add_custom_target
> but found no direct anwser from either.
>
> I tried using dependencies but nothing came out of that for me.
Then show us some code on how you defined that command.
Eike
More information about the CMake
mailing list