CMP0071ΒΆ
Added in version 3.10.
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
.
The OLD
behavior for this policy is to ignore GENERATED
source files in AUTOMOC
and AUTOUIC
.
The NEW
behavior for this policy is to process GENERATED
source files in AUTOMOC
and AUTOUIC
just like regular
source files.
Note
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.
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.