If you must run a script verbatim, then write a script.<div><br></div><div>Then have cmake just execute the script.<br><br></div><div><br><div class="gmail_quote">On Wed, Mar 17, 2010 at 1:42 PM, Alan W. Irwin <span dir="ltr"><<a href="mailto:irwin@beluga.phys.uvic.ca">irwin@beluga.phys.uvic.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">According to "Unix in a Nutshell", the bourne and korn shells use the<br>
following method of splitting stderr and stdout into two separate<br>
files.<br>
<br>
(cmd >f1) 2>f2<br>
<br>
I have checked that the parentheses work for bash, although they are not<br>
necessary. Therefore, the above seems to be a good candidate for the best<br>
way to split stderr and stdout if you want your build system to work for a<br>
wide variety of bourne (or korn) shell dialects.<br>
<br>
However, CMake COMMAND totally buggers the above construct regardless of<br>
whether VERBATIM is set and regardless of spacing around the parentheses or<br>
not. A number of issues occur, but the constant one for all variants that I<br>
tried is the opening parentheses are quoted which is then interpreted as a<br>
separate command (at least by bash).<br>
<br>
Of course, I can always drop the parentheses for my own (bash) needs, and<br>
then all is well. But I am concerned that may be a non-standard bashism<br>
that is being forced on me by CMake that will not work for most/all other<br>
bourne shell dialects.<br>
<br>
Alan<br>
__________________________<br>
Alan W. Irwin<br>
<br>
Astronomical research affiliation with Department of Physics and Astronomy,<br>
University of Victoria (<a href="http://astrowww.phys.uvic.ca" target="_blank">astrowww.phys.uvic.ca</a>).<br>
<br>
Programming affiliations with the FreeEOS equation-of-state implementation<br>
for stellar interiors (<a href="http://freeeos.sf.net" target="_blank">freeeos.sf.net</a>); PLplot scientific plotting software<br>
package (<a href="http://plplot.org" target="_blank">plplot.org</a>); the libLASi project (<a href="http://unifont.org/lasi" target="_blank">unifont.org/lasi</a>); the Loads of<br>
Linux Links project (<a href="http://loll.sf.net" target="_blank">loll.sf.net</a>); and the Linux Brochure Project<br>
(<a href="http://lbproject.sf.net" target="_blank">lbproject.sf.net</a>).<br>
__________________________<br>
<br>
Linux-powered Science<br>
__________________________<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>