CMP0100 — CMake 4.2.6 Documentation

# CMP0100

Added in version 3.17.

Let `AUTOMOC` and `AUTOUIC` process header files that end with a `.hh` extension.

Since version 3.17, CMake processes header files that end with a `.hh` extension in `AUTOMOC` and `AUTOUIC`. In earlier CMake versions, these header files were ignored by `AUTOMOC` and `AUTOUIC`.

This policy affects how header files that end with a `.hh` extension get treated in `AUTOMOC` and `AUTOUIC`.

The `OLD` behavior for this policy is to ignore `.hh` header files in `AUTOMOC` and `AUTOUIC`.

The `NEW` behavior for this policy is to process `.hh` header files in `AUTOMOC` and `AUTOUIC` just like other header files.

Note

To silence the `CMP0100` warning source files can be excluded from `AUTOMOC` and `AUTOUIC` processing by setting the source file properties `SKIP_AUTOMOC`, `SKIP_AUTOUIC` or `SKIP_AUTOGEN`.

    # Source skip example:
    set_property(SOURCE /path/to/file1.hh PROPERTY SKIP_AUTOMOC ON)
    set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON)
    set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON)

This policy was introduced in CMake version 3.17.0. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake warns, and uses `OLD` behavior.

Note

The `OLD` behavior of a policy is `deprecated by definition` and may be removed in a future version of CMake.