For now, another workaround would be to write a script that calls patch with the -i argument and then invoke the script with execute_process or a different cmake -E command line...<br><br><div><br><div class="gmail_quote">
On Tue, Nov 24, 2009 at 7:43 PM, Hugh Sorby <span dir="ltr"><<a href="mailto:h.sorby@auckland.ac.nz">h.sorby@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Alan,<br>
<br>
I will attempt to:<br>
<br>
1) search the CMake bug tracker (not very good at this most never seem to find anything relevant)<br>
2) add new bug if 1) fails to bear any fruit.<br>
<br>
Unfortunately the<div class="im"><br>
<br>
cmake -E chdir netgen patch -p0 < netgen-4.9.11.patch<br>
<br></div>
doesn't work so well on Windows Vista which is why I was trying to use the -i option.<div><div></div><div class="h5"><br>
<br>
<br>
Alan W. Irwin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2009-11-25 11:00+1200 Hugh Sorby wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry about that missed a chdir should be<br>
<br>
cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch<br>
</blockquote>
<br>
I confirm that you have found a bug (at least with Debian stable Linux and a<br>
bootstrapped cmake version 2.8.0-rc6). Here is a simple demonstration<br>
with "ls -i".<br>
<br>
software@raven> ls -i config.h<br>
4539478 config.h<br>
<br>
software@raven> cmake -E chdir . ls -i config.h<br>
config.h<br>
<br>
In other words the ls -i option is consumed by CMake just like the patch -i<br>
option is consumed for you. Note that -i is an<br>
option for CMake itself (wizard mode) so there is probably some screwup<br>
in interpretation of the command line when cmake -E is being run.<br>
If I change the flag from -i to -l, then the flag is not consumed and<br>
you get the same results for<br>
<br>
"ls -l config.h" and "cmake -E chdir . ls -l config.h". That's consistent<br>
with the idea that you will only have trouble with cmake consuming the<br>
option when it is an option it recognizes. ("-l" is not a cmake command<br>
option while "-i" is).<br>
<br>
I also confirm the bug occurs for cmake-2.6.0 (the Debian stable system<br>
version) which makes it a bug that has been around for quite a while. I<br>
suggest you go ahead and put it in the bugtracker (if you cannot find<br>
another report about the same issue there).<br>
<br>
Until this cmake -E option consuming bug is fixed I suggest you could avoid<br>
the -i option with patch by using, e.g.,<br>
<br>
cmake -E chdir netgen patch -p0 <netgen-4.9.11.patch<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>
</blockquote>
_______________________________________________<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>
</div></div></blockquote></div><br></div>