write_file.rst 686 B

12345678910111213141516171819202122
  1. write_file
  2. ----------
  3. .. deprecated:: 3.0
  4. Use the :command:`file(WRITE)` command instead.
  5. ::
  6. write_file(filename "message to write"... [APPEND])
  7. The first argument is the file name, the rest of the arguments are
  8. messages to write. If the argument ``APPEND`` is specified, then the
  9. message will be appended.
  10. NOTE 1: :command:`file(WRITE)` and :command:`file(APPEND)` do exactly
  11. the same as this one but add some more functionality.
  12. NOTE 2: When using ``write_file`` the produced file cannot be used as an
  13. input to CMake (CONFIGURE_FILE, source file ...) because it will lead
  14. to an infinite loop. Use :command:`configure_file` if you want to
  15. generate input files to CMake.