[CMake] Execute a custom command without any dependency

Martin Koller martin.koller at etm.at
Tue Dec 18 13:45:39 EST 2012


On Monday 17 December 2012 20:04:48 Sergey Prokhorenko wrote:
> Hello.
> 
> I want to run a custom command that parses a whole source tree, so I
> can't list dependencies to add_custom_command/target. Is there another
> way? Just always run a program, that's all.

add_custom_target doc says:
"The target has no output file and is ALWAYS CONSIDERED OUT OF DATE"

so it should work to use

add_custom_target(do_always ALL COMMAND theCommand)

-- 
Best regards/Schöne Grüße

Martin

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

This mail was not scanned before sending.
It was sent from a secure Linux desktop.


More information about the CMake mailing list