summaryrefslogtreecommitdiffstats
path: root/Help/command/configure_file.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-29 13:31:31 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-29 13:32:09 (GMT)
commit75dd9b6c97a7b553d905c5bb3ef41cd38afc7315 (patch)
tree01fe846862c10d4454a4df3430f5d4b8f6f347af /Help/command/configure_file.rst
parentb355358de359fa0c9b225715fbbfb7d34b362668 (diff)
parent769ff05483fa92e63466839854c4f3f0142a4fb3 (diff)
downloadCMake-75dd9b6c97a7b553d905c5bb3ef41cd38afc7315.zip
CMake-75dd9b6c97a7b553d905c5bb3ef41cd38afc7315.tar.gz
CMake-75dd9b6c97a7b553d905c5bb3ef41cd38afc7315.tar.bz2
Merge topic 'commands-file-permissions'
769ff05483 Help: Clarify permission-related command options 900184616a Cleanup: Fix misspelt name of local C++ variable 635431a0c9 Tests: Check host platform instead of target for running stat 4ceb0ca59e Tests: Remove redundant files for configure_file() tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5945
Diffstat (limited to 'Help/command/configure_file.rst')
-rw-r--r--Help/command/configure_file.rst37
1 files changed, 22 insertions, 15 deletions
diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst
index 8f082e8..086668c 100644
--- a/Help/command/configure_file.rst
+++ b/Help/command/configure_file.rst
@@ -6,9 +6,9 @@ Copy a file to another location and modify its contents.
.. code-block:: cmake
configure_file(<input> <output>
- [FILE_PERMISSIONS <permissions>...]
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS |
+ FILE_PERMISSIONS <permissions>...]
[COPYONLY] [ESCAPE_QUOTES] [@ONLY]
- [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
Copies an ``<input>`` file to an ``<output>`` file and substitutes
@@ -97,8 +97,27 @@ 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.
+``NO_SOURCE_PERMISSIONS``
+ .. versionadded:: 3.19
+
+ Do not transfer the permissions of the input file to the output file.
+ The copied file permissions default to the standard 644 value
+ (-rw-r--r--).
+
+``USE_SOURCE_PERMISSIONS``
+ .. versionadded:: 3.20
+
+ Transfer the permissions of the input file to the output file.
+ This is already the default behavior if none of the three permissions-related
+ keywords are given (``NO_SOURCE_PERMISSIONS``, ``USE_SOURCE_PERMISSIONS``
+ or ``FILE_PERMISSIONS``). The ``USE_SOURCE_PERMISSIONS`` keyword mostly
+ serves as a way of making the intended behavior clearer at the call site.
+
``FILE_PERMISSIONS <permissions>...``
- Use user provided permissions for the output file.
+ .. versionadded:: 3.20
+
+ Ignore the input file's permissions and use the specified ``<permissions>``
+ for the output file instead.
``COPYONLY``
Copy the file without replacing any variable references or other
@@ -111,18 +130,6 @@ The arguments are:
Restrict variable replacement to references of the form ``@VAR@``.
This is useful for configuring scripts that use ``${VAR}`` syntax.
-``NO_SOURCE_PERMISSIONS``
- .. versionadded:: 3.19
-
- Does not transfer the file permissions of the original file to the copy.
- The copied file permissions default to the standard 644 value
- (-rw-r--r--).
-
-``USE_SOURCE_PERMISSIONS``
- .. versionadded:: 3.20
-
- 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