[CMake] COMMAND does not accept standard method of splitting stderr and stdout results

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Mar 17 19:02:11 EDT 2010


On 2010-03-17 22:57+0100 Michael Wild wrote:

> I just tried a few things, and it seems that you can use eval to your advantage:
>
> project(test C)
> add_custom_command(OUTPUT bla.stderr bla.stdout
>  COMMAND eval
>    "((echo 'this is stdout'; echo 'this is stderr' >&2) > bla.stdout) 2> bla.stderr"
>  VERBATIM
>  )
> add_custom_target(bla ALL DEPENDS bla.stderr bla.stdout VERBATIM)
>

Thanks, Michael, for suggesting that even simpler workaround which I will
use.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list