write_file.rst 630 B

1234567891011121314151617181920
  1. write_file
  2. ----------
  3. Deprecated. Use the 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: file(WRITE ... and file(APPEND ... do exactly the same as
  10. 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 configure_file if you want to generate input
  14. files to CMake.