mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user