ADDITIONAL_CLEAN_FILES.rst 922 B

1234567891011121314151617181920212223
  1. ADDITIONAL_CLEAN_FILES
  2. ----------------------
  3. .. versionadded:: 3.15
  4. A :ref:`;-list <CMake Language Lists>` of files or directories that will be
  5. removed as a part of the global ``clean`` target. It is useful for
  6. specifying generated files or directories that are used by multiple targets
  7. or by CMake itself, or that are generated in ways which cannot be captured as
  8. outputs or byproducts of custom commands.
  9. If an additional clean file is specific to a single target only, then the
  10. :prop_tgt:`ADDITIONAL_CLEAN_FILES` target property would usually be a better
  11. choice than this directory property.
  12. Relative paths are allowed and are interpreted relative to the
  13. current binary directory.
  14. Contents of ``ADDITIONAL_CLEAN_FILES`` may use
  15. :manual:`generator expressions <cmake-generator-expressions(7)>`.
  16. This property only works for the :generator:`Ninja` and the Makefile
  17. generators. It is ignored by other generators.