summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-22 14:12:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-22 14:12:20 (GMT)
commit3cf1a8c59ba8ebaeb86c41300cf3f78469a30310 (patch)
tree3dcedae624ba4a71f6ff66b198d5d1abb7489a44 /Help/command
parent3f85a9597838cc550e6c7dcdef6c036fc508b122 (diff)
parentc3385dd8bd7c78cf03d7e52ae0f49e8216cdaaea (diff)
downloadCMake-3cf1a8c59ba8ebaeb86c41300cf3f78469a30310.zip
CMake-3cf1a8c59ba8ebaeb86c41300cf3f78469a30310.tar.gz
CMake-3cf1a8c59ba8ebaeb86c41300cf3f78469a30310.tar.bz2
Merge topic 'issue-15653'
c3385dd8bd file(GENERATE): Support options to manipulate file permissions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5437
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/file.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 6837672..76a07f9 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -479,7 +479,9 @@ modified.
file(GENERATE OUTPUT output-file
<INPUT input-file|CONTENT content>
- [CONDITION expression] [TARGET target])
+ [CONDITION expression] [TARGET target]
+ [FILE_PERMISSIONS <permissions>...]
+ [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS])
Generate an output file for each build configuration supported by the current
:manual:`CMake Generator <cmake-generators(7)>`. Evaluate
@@ -520,6 +522,17 @@ from the input content to produce the output content. The options are:
require a target for evaluation (e.g. ``$<COMPILE_FEATURES:...>``,
``$<TARGET_PROPERTY:prop>``).
+``FILE_PERMISSIONS <permissions>...``
+ Use user provided permissions for the generated file.
+
+``NO_SOURCE_PERMISSIONS``
+ The generated file permissions default to the standard 644 value
+ (-rw-r--r--).
+
+``USE_SOURCE_PERMISSIONS``
+ Transfer the file permissions of the original file to the generated file.
+ This option expects INPUT option.
+
Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific
``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``.
Generated files are modified and their timestamp updated on subsequent cmake