summaryrefslogtreecommitdiffstats
path: root/Help/command/file.rst
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-12-22 12:29:34 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2021-02-01 00:38:19 (GMT)
commit255df8622bc42c62bd8bc81d2ff2964ef8d6a803 (patch)
treee4540fb3853c457c190117a6a7542f807c0c1094 /Help/command/file.rst
parent93eef927779c14214d7730ccc6cbb94a04126af7 (diff)
downloadCMake-255df8622bc42c62bd8bc81d2ff2964ef8d6a803.zip
CMake-255df8622bc42c62bd8bc81d2ff2964ef8d6a803.tar.gz
CMake-255df8622bc42c62bd8bc81d2ff2964ef8d6a803.tar.bz2
file(GENERATE): Support new line style
Fixes: #19198
Diffstat (limited to 'Help/command/file.rst')
-rw-r--r--Help/command/file.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 76a07f9..41866ca 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -481,7 +481,8 @@ modified.
<INPUT input-file|CONTENT content>
[CONDITION expression] [TARGET target]
[FILE_PERMISSIONS <permissions>...]
- [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS])
+ [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
+ [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
Generate an output file for each build configuration supported by the current
:manual:`CMake Generator <cmake-generators(7)>`. Evaluate
@@ -533,6 +534,13 @@ from the input content to produce the output content. The options are:
Transfer the file permissions of the original file to the generated file.
This option expects INPUT option.
+``NEWLINE_STYLE <style>``
+ .. versionadded:: 3.20
+
+ Specify the newline style for the generated file. Specify
+ ``UNIX`` or ``LF`` for ``\n`` newlines, or specify
+ ``DOS``, ``WIN32``, or ``CRLF`` for ``\r\n`` newlines.
+
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