title: How to redirect the output of a CMake custom command to a file?
body: <p>I need to execute a command with <code>add_custom_command</code> a capture its stdout. The shell redirection to file <code>&gt;</code> does not work and <code>add_custom_command</code> does not have any related options. How can I do it?</p>