[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 13:42:58 EDT 2010
According to "Unix in a Nutshell", the bourne and korn shells use the
following method of splitting stderr and stdout into two separate
files.
(cmd >f1) 2>f2
I have checked that the parentheses work for bash, although they are not
necessary. Therefore, the above seems to be a good candidate for the best
way to split stderr and stdout if you want your build system to work for a
wide variety of bourne (or korn) shell dialects.
However, CMake COMMAND totally buggers the above construct regardless of
whether VERBATIM is set and regardless of spacing around the parentheses or
not. A number of issues occur, but the constant one for all variants that I
tried is the opening parentheses are quoted which is then interpreted as a
separate command (at least by bash).
Of course, I can always drop the parentheses for my own (bash) needs, and
then all is well. But I am concerned that may be a non-standard bashism
that is being forced on me by CMake that will not work for most/all other
bourne shell dialects.
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