[CMake] patch on Windows

Eric Noulard eric.noulard at gmail.com
Sun Jan 12 07:03:36 EST 2014


2014/1/12 Pau Garcia i Quiles <pgquiles at elpauer.org>:
>
>
>
> On Sun, Jan 12, 2014 at 1:39 AM, Rob McDonald <rob.a.mcdonald at gmail.com>
> wrote:
>>
>> Where does CMake get its patch implementation?
>
>
> It doesn't. It would be great if CMake implemented a "cmake -E patch".
>
>>
>>
>>
>> I'm using a patch step with ExternalProject_Add on Windows (and other
>> platforms).
>>
>
> I am downloading the patch binary from GNUWin32 as a pre-step on Windows.
> Take a look at winstng:
>
> https://elpauer.assembla.com/code/winstng/git/nodes/master/cmake/CMakeLists.txt
>
> Problem is patch from GNUWin32 does not support Unix line endings (it will
> crash), therefore I am forced to use Windows line endings in every patch
> (unix2dos is your friend).

It seems like tortoiseMerge may apply patch as well:

http://stackoverflow.com/questions/517257/how-do-i-apply-a-diff-patch-on-windows
http://tortoisesvn.net/docs/nightly/TortoiseMerge_en/tme-automation.html

Stackoverflow refers to pure python implementation of patch as well:
https://code.google.com/p/python-patch/

I did never tried neither of those two myself though.



-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org


More information about the CMake mailing list