CMP0100.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. CMP0100
  2. -------
  3. .. versionadded:: 3.17
  4. Let :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` process
  5. header files that end with a ``.hh`` extension.
  6. Since version 3.17, CMake processes header files that end with a
  7. ``.hh`` extension in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
  8. In earlier CMake versions, these header files were ignored by
  9. :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
  10. This policy affects how header files that end with a ``.hh`` extension
  11. get treated in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
  12. The ``OLD`` behavior for this policy is to ignore ``.hh`` header files
  13. in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
  14. The ``NEW`` behavior for this policy is to process ``.hh`` header files
  15. in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` just like other header files.
  16. .. note::
  17. To silence the ``CMP0100`` warning source files can be excluded from
  18. :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` processing by setting the
  19. source file properties :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC` or
  20. :prop_sf:`SKIP_AUTOGEN`.
  21. .. code-block:: cmake
  22. # Source skip example:
  23. set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
  24. set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
  25. set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)
  26. This policy was introduced in CMake version 3.17.0. CMake version
  27. |release| warns when the policy is not set and uses ``OLD`` behavior.
  28. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  29. explicitly.
  30. .. include:: DEPRECATED.txt