CMP0118.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. CMP0118
  2. -------
  3. .. versionadded:: 3.20
  4. :prop_sf:`GENERATED` sources may be used across directories without manual marking.
  5. In CMake 3.19 and below, the :prop_sf:`GENERATED` source file property,
  6. like other source file properties, was scoped in every directory separately.
  7. If a source file was generated in one directory, projects had to manually
  8. set the ``GENERATED`` property in another directory in order to use the file.
  9. Whether or not a source file is generated is an all-or-nothing global
  10. property of the source: a source is either generated or it is not.
  11. CMake 3.20 and above prefer to allow source files generated in one directory
  12. to be used in other directories without manually marking them as ``GENERATED``.
  13. Additionally, the ``GENERATED`` property may now be set only to boolean
  14. values, and may not be turned off once turned on. This policy provides
  15. compatibility for projects that have not been updated for this behavior.
  16. The ``OLD`` behavior of this policy is to allow generated files to be used
  17. only in directories in which their ``GENERATED`` property has been turned on.
  18. The ``NEW`` behavior of this policy is to allow generated files to be used
  19. in other directories without explicitly turning on the ``GENERATED`` property
  20. for those directories.
  21. .. versionadded:: 3.30
  22. Policy :policy:`CMP0163` additionally makes the :prop_sf:`GENERATED` source
  23. file property visible to :command:`get_property` and
  24. :command:`get_source_file_property` calls in other directories.
  25. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20
  26. .. |WARNS_OR_DOES_NOT_WARN| replace::
  27. warns about setting the ``GENERATED`` property to a non-boolean value
  28. .. include:: include/STANDARD_ADVICE.rst
  29. .. include:: include/DEPRECATED.rst