cmake/Help/command/write_file.rst

23 lines
686 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
write_file
----------
2019-11-11 23:01:05 +01:00
.. deprecated:: 3.0
Use the :command:`file(WRITE)` command instead.
2014-08-03 19:52:23 +02:00
::
write_file(filename "message to write"... [APPEND])
The first argument is the file name, the rest of the arguments are
2015-11-17 17:22:37 +01:00
messages to write. If the argument ``APPEND`` is specified, then the
2014-08-03 19:52:23 +02:00
message will be appended.
2015-11-17 17:22:37 +01:00
NOTE 1: :command:`file(WRITE)` and :command:`file(APPEND)` do exactly
the same as this one but add some more functionality.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01:00
NOTE 2: When using ``write_file`` the produced file cannot be used as an
2014-08-03 19:52:23 +02:00
input to CMake (CONFIGURE_FILE, source file ...) because it will lead
2015-11-17 17:22:37 +01:00
to an infinite loop. Use :command:`configure_file` if you want to
generate input files to CMake.