CMP0100.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17.0
  27. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  28. .. include:: STANDARD_ADVICE.txt
  29. .. include:: DEPRECATED.txt