On 12.01.2014 01:39, Rob McDonald wrote:
Where does CMake get its patch implementation?

As far as I know CMake does not have a patch implementation.


I'm using a patch step with ExternalProject_Add on Windows (and other platforms).

I had it working on one Windows machine - which unfortunately just got knocked off a desk and will never be recovered. The same files on a different Windows machine doesn't work.

'patch' is not recognized as an internal or external command.

Looks like CMake can't find 'patch', but I thought it was built-in. I was using 2.8.8, but when I ran into this, I upgraded to 2.8.12.1 -- no change.

I think if your PATCH_COMMAND literally contained "patch" (without path) the only way it was working before is that it was somewhere in your PATH environment.

Is there a FindPATCH.cmake I need to use? For Windows patching, am I better off just carrying new copies of the changed files and copying them over in the patch step?

I don't think cmake provides a FindPATCH.cmake but there wouldn't be one to be found per default on a standard windows installation either. The PATCH_COMMAND can be anything. For something portable I'd try to stick to "${CMAKE_COMMAND} -E" (command mode) or "${CMAKE_COMMAND} -P" (script mode). -E provides copy commands while -P would allow you to read and write files and perform e.g. regular string or regexp substitutions.

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to