|
@@ -481,8 +481,8 @@ modified.
|
|
|
file(GENERATE OUTPUT output-file
|
|
file(GENERATE OUTPUT output-file
|
|
|
<INPUT input-file|CONTENT content>
|
|
<INPUT input-file|CONTENT content>
|
|
|
[CONDITION expression] [TARGET target]
|
|
[CONDITION expression] [TARGET target]
|
|
|
- [FILE_PERMISSIONS <permissions>...]
|
|
|
|
|
- [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
|
|
|
|
|
|
|
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS |
|
|
|
|
|
+ FILE_PERMISSIONS <permissions>...]
|
|
|
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
|
|
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
|
|
|
|
|
|
|
|
Generate an output file for each build configuration supported by the current
|
|
Generate an output file for each build configuration supported by the current
|
|
@@ -524,16 +524,26 @@ from the input content to produce the output content. The options are:
|
|
|
require a target for evaluation (e.g. ``$<COMPILE_FEATURES:...>``,
|
|
require a target for evaluation (e.g. ``$<COMPILE_FEATURES:...>``,
|
|
|
``$<TARGET_PROPERTY:prop>``).
|
|
``$<TARGET_PROPERTY:prop>``).
|
|
|
|
|
|
|
|
-``FILE_PERMISSIONS <permissions>...``
|
|
|
|
|
- Use user provided permissions for the generated file.
|
|
|
|
|
-
|
|
|
|
|
``NO_SOURCE_PERMISSIONS``
|
|
``NO_SOURCE_PERMISSIONS``
|
|
|
|
|
+ .. versionadded:: 3.20
|
|
|
|
|
+
|
|
|
The generated file permissions default to the standard 644 value
|
|
The generated file permissions default to the standard 644 value
|
|
|
(-rw-r--r--).
|
|
(-rw-r--r--).
|
|
|
|
|
|
|
|
``USE_SOURCE_PERMISSIONS``
|
|
``USE_SOURCE_PERMISSIONS``
|
|
|
- Transfer the file permissions of the original file to the generated file.
|
|
|
|
|
- This option expects INPUT option.
|
|
|
|
|
|
|
+ .. versionadded:: 3.20
|
|
|
|
|
+
|
|
|
|
|
+ Transfer the file permissions of the ``INPUT`` file to the generated 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.
|
|
|
|
|
+ It is an error to specify this option without ``INPUT``.
|
|
|
|
|
+
|
|
|
|
|
+``FILE_PERMISSIONS <permissions>...``
|
|
|
|
|
+ .. versionadded:: 3.20
|
|
|
|
|
+
|
|
|
|
|
+ Use the specified permissions for the generated file.
|
|
|
|
|
|
|
|
``NEWLINE_STYLE <style>``
|
|
``NEWLINE_STYLE <style>``
|
|
|
.. versionadded:: 3.20
|
|
.. versionadded:: 3.20
|
|
@@ -738,9 +748,9 @@ Create the given directories and their parents as needed.
|
|
|
.. code-block:: cmake
|
|
.. code-block:: cmake
|
|
|
|
|
|
|
|
file(<COPY|INSTALL> <files>... DESTINATION <dir>
|
|
file(<COPY|INSTALL> <files>... DESTINATION <dir>
|
|
|
|
|
+ [NO_SOURCE_PERMISSIONS | USE_SOURCE_PERMISSIONS]
|
|
|
[FILE_PERMISSIONS <permissions>...]
|
|
[FILE_PERMISSIONS <permissions>...]
|
|
|
[DIRECTORY_PERMISSIONS <permissions>...]
|
|
[DIRECTORY_PERMISSIONS <permissions>...]
|
|
|
- [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
|
|
|
|
|
[FOLLOW_SYMLINK_CHAIN]
|
|
[FOLLOW_SYMLINK_CHAIN]
|
|
|
[FILES_MATCHING]
|
|
[FILES_MATCHING]
|
|
|
[[PATTERN <pattern> | REGEX <regex>]
|
|
[[PATTERN <pattern> | REGEX <regex>]
|