write_file.rst 675 B

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