[CMake] Getting cmake to apply patches

Hugh Sorby h.sorby at auckland.ac.nz
Tue Nov 24 19:43:17 EST 2009


Thanks Alan,

I will attempt to:

1) search the CMake bug tracker (not very good at this most never seem 
to find anything relevant)
2) add new bug if 1) fails to bear any fruit.

Unfortunately the

cmake -E chdir netgen patch -p0 < netgen-4.9.11.patch

doesn't work so well on Windows Vista which is why I was trying to use 
the -i option.


Alan W. Irwin wrote:
> On 2009-11-25 11:00+1200 Hugh Sorby wrote:
>
>> Sorry about that missed a chdir should be
>>
>> cmake -E chdir netgen patch -p0 -i netgen-4.9.11.patch
>
> I confirm that you have found a bug (at least with Debian stable Linux 
> and a
> bootstrapped cmake version 2.8.0-rc6).  Here is a simple demonstration
> with "ls -i".
>
> software at raven> ls -i config.h
> 4539478 config.h
>
> software at raven> cmake -E chdir . ls -i config.h
> config.h
>
> In other words the ls -i option is consumed by CMake just like the 
> patch -i
> option is consumed for you.  Note that -i is an
> option for CMake itself (wizard mode) so there is probably some screwup
> in interpretation of the command line when cmake -E is being run.
> If I change the flag from -i to -l, then the flag is not consumed and
> you get the same results for
>
> "ls -l config.h" and "cmake -E chdir . ls -l config.h".  That's 
> consistent
> with the idea that you will only have trouble with cmake consuming the
> option when it is an option it recognizes.  ("-l" is not a cmake command
> option while "-i" is).
>
> I also confirm the bug occurs for cmake-2.6.0 (the Debian stable system
> version) which makes it a bug that has been around for quite a while.  I
> suggest you go ahead and put it in the bugtracker (if you cannot find
> another report about the same issue there).
>
> Until this cmake -E option consuming bug is fixed I suggest you could 
> avoid
> the -i option with patch by using, e.g.,
>
> cmake -E chdir netgen patch -p0 <netgen-4.9.11.patch
>
> 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