[cmake-developers] [CMake 0015244]: Add "cmake -E patch" command line option and "file(PATCH)" command
Mantis Bug Tracker
mantis at public.kitware.com
Tue Nov 11 19:21:18 EST 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15244
======================================================================
Reported By: Daniele E. Domenichelli
Assigned To:
======================================================================
Project: CMake
Issue ID: 15244
Category: CMake
Reproducibility: N/A
Severity: feature
Priority: low
Status: new
======================================================================
Date Submitted: 2014-11-11 19:21 EST
Last Modified: 2014-11-11 19:21 EST
======================================================================
Summary: Add "cmake -E patch" command line option and
"file(PATCH)" command
Description:
The ExternalProject module accepts a "PATCH_COMMAND" argument to apply a patch
to a project. In another scenario, one would like be to able to apply a patch to
a downloaded file. Unfortunately neither of these goal can be achieved easily in
a portable way.
- The "patch" command is usually not available on windows.
- "git apply", "hg import", etc work on every platform, but only work for git,
mercurial repositories, etc. and don't work for downloaded archives and files.
It would be nice to have a command line option like "cmake -E patch" to apply a
patch, that accepts the most commonly used options of the "patch" command (at
least -p, -l, -R, and -i). This would ensure that the "PATCH_COMMAND" will work
on every platform.
The "file" command could have a new PATCH argument that accepts(at least) an
input file, the working directory, a STRIP argument (-p1), an IGNORE_WHITESPACE,
and a REVERSE option. The signature could be something like this:
file(PATCH filename working_dir
[STRIP levels]
[IGNORE_WHITESPACE]
[REVERSE])
This could be used to patch a file after downloading it with "file(DOWNLOAD)"
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-11-11 19:21 Daniele E. DomenichelliNew Issue
======================================================================
More information about the cmake-developers
mailing list