CMP0071

Let AUTOMOC and AUTOUIC process GENERATED files.

Since version 3.10, CMake processes regular and GENERATED source files in AUTOMOC and AUTOUIC . In earlier CMake versions, only regular source files were processed. GENERATED source files were ignored silently.

This policy affects how source files that are GENERATED get treated in AUTOMOC and AUTOUIC .

OLD behavior for this policy is to ignore GENERATED source files in AUTOMOC and AUTOUIC .

NEW behavior for this policy is to process GENERATED source files in AUTOMOC and AUTOUIC just like regular source files.

注意

To silence the CMP0071 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.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE /path/to/file2.h PROPERTY SKIP_AUTOUIC ON)
set_property(SOURCE /path/to/file3.h PROPERTY SKIP_AUTOGEN ON)
# ...
									

This policy was introduced in CMake version 3.10. CMake version 3.14.0-rc2 warns when the policy is not set and uses OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.

注意

OLD behavior of a policy is 弃用 by definition and may be removed in a future version of CMake.

上一话题

CMP0072

下一话题

CMP0070

本页