mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 08:40:11 -06:00
configure_file: Add option for user defined permissions
User defined permissions and options to copy permissions are implemented. Fixes: #20866
This commit is contained in:
@@ -6,8 +6,9 @@ Copy a file to another location and modify its contents.
|
||||
.. code-block:: cmake
|
||||
|
||||
configure_file(<input> <output>
|
||||
[FILE_PERMISSIONS <permissions>...]
|
||||
[COPYONLY] [ESCAPE_QUOTES] [@ONLY]
|
||||
[NO_SOURCE_PERMISSIONS]
|
||||
[NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
|
||||
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
|
||||
|
||||
Copies an ``<input>`` file to an ``<output>`` file and substitutes
|
||||
@@ -72,6 +73,9 @@ The arguments are:
|
||||
If the path names an existing directory the output file is placed
|
||||
in that directory with the same file name as the input file.
|
||||
|
||||
``FILE_PERMISSIONS <permissions>...``
|
||||
Use user provided permissions for the output file.
|
||||
|
||||
``COPYONLY``
|
||||
Copy the file without replacing any variable references or other
|
||||
content. This option may not be used with ``NEWLINE_STYLE``.
|
||||
@@ -88,6 +92,9 @@ The arguments are:
|
||||
The copied file permissions default to the standard 644 value
|
||||
(-rw-r--r--).
|
||||
|
||||
``USE_SOURCE_PERMISSIONS``
|
||||
Transfer the file permissions of the original file to the output file.
|
||||
|
||||
``NEWLINE_STYLE <style>``
|
||||
Specify the newline style for the output file. Specify
|
||||
``UNIX`` or ``LF`` for ``\n`` newlines, or specify
|
||||
|
||||
6
Help/release/dev/configure_file-user-permissions.rst
Normal file
6
Help/release/dev/configure_file-user-permissions.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
configure_file-user-permissions
|
||||
-------------------------------
|
||||
|
||||
* The :command:`configure_file` command gained a ``USE_SOURCE_PERMISSIONS``
|
||||
and ``FILE_PERMISSIONS`` option to support copying of permissions of source
|
||||
file and specifying user defined permissions.
|
||||
Reference in New Issue
Block a user