[CMake] Help with Execute_Process

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Jul 15 15:50:30 EDT 2008


On 2008-07-15 13:10+0200 Carminati Federico wrote:

> Hello,
>  I would like to execute the following command
>
> Execute_Process(
>  COMMAND svn info | grep \"Last Changed Rev:\" |  cut -d: -f2
>  OUTPUT_VARIABLE _res)
>
> But concatenation with pipes does not work. Any hint? Best regards,

I haven't tried this myself, but the execute_process documentation says:

"Runs the given sequence of one or more commands with the standard output of
each process piped to the standard input of the next.  A single standard
error pipe is used for all processes."

So I think

COMMAND svn info
COMMAND grep \"Last Changed Rev:\" 
COMMAND  cut -d: -f2

should do what you want.

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