The COMPATIBLE_INTERFACE does not affect the target it is set on.
Test and document this.
This commit is contained in:
parent
5f926a5802
commit
46e28960a5
@ -900,24 +900,24 @@ void cmTarget::DefineProperties(cmake *cm)
|
|||||||
"Properties which must be compatible with their link interface",
|
"Properties which must be compatible with their link interface",
|
||||||
"The COMPATIBLE_INTERFACE_BOOL property may contain a list of properties"
|
"The COMPATIBLE_INTERFACE_BOOL property may contain a list of properties"
|
||||||
"for this target which must be consistent when evaluated as a boolean "
|
"for this target which must be consistent when evaluated as a boolean "
|
||||||
"in the INTERFACE of all linked dependencies. For example, if a "
|
"in the INTERFACE of all linked dependees. For example, if a "
|
||||||
"property \"FOO\" appears in the list, then the \"INTERFACE_FOO\" "
|
"property \"FOO\" appears in the list, then for each dependee, the "
|
||||||
"property content in all dependencies must be consistent with each "
|
"\"INTERFACE_FOO\" property content in all of its dependencies must be "
|
||||||
"other, and with the \"FOO\" property in this target. "
|
"consistent with each other, and with the \"FOO\" property in the "
|
||||||
"Consistency in this sense has the meaning that if the property is set,"
|
"dependee. Consistency in this sense has the meaning that if the "
|
||||||
"then it must have the same boolean value as all others, and if the "
|
"property is set, then it must have the same boolean value as all "
|
||||||
"property is not set, then it is ignored.");
|
"others, and if the property is not set, then it is ignored.");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("COMPATIBLE_INTERFACE_STRING", cmProperty::TARGET,
|
("COMPATIBLE_INTERFACE_STRING", cmProperty::TARGET,
|
||||||
"Properties which must be string-compatible with their link interface",
|
"Properties which must be string-compatible with their link interface",
|
||||||
"The COMPATIBLE_INTERFACE_STRING property may contain a list of "
|
"The COMPATIBLE_INTERFACE_STRING property may contain a list of "
|
||||||
"properties for this target which must be the same when evaluated as "
|
"properties for this target which must be the same when evaluated as "
|
||||||
"a string in the INTERFACE of all linked dependencies. For example, "
|
"a string in the INTERFACE of all linked dependees. For example, "
|
||||||
"if a property \"FOO\" appears in the list, then the \"INTERFACE_FOO\" "
|
"if a property \"FOO\" appears in the list, then for each dependee, the "
|
||||||
"property content in all dependencies must be equal with each "
|
"\"INTERFACE_FOO\" property content in all of its dependencies must be "
|
||||||
"other, and with the \"FOO\" property in this target. If the "
|
"equal with each other, and with the \"FOO\" property in the dependee. "
|
||||||
"property is not set, then it is ignored.");
|
"If the property is not set, then it is ignored.");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("POST_INSTALL_SCRIPT", cmProperty::TARGET,
|
("POST_INSTALL_SCRIPT", cmProperty::TARGET,
|
||||||
|
@ -67,3 +67,18 @@ target_compile_definitions(CompatibleInterface
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:SOME_DEFINE>
|
$<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:SOME_DEFINE>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# The COMPATIBLE_INTERFACE_* properties are only read from dependencies
|
||||||
|
# in the interface. Populating it on the CompatibleInterface target does
|
||||||
|
# not have any affect on the interpretation of the INTERFACE variants
|
||||||
|
# in dependencies.
|
||||||
|
set_property(TARGET iface1 PROPERTY
|
||||||
|
INTERFACE_NON_RELEVANT_PROP ON
|
||||||
|
)
|
||||||
|
set_property(TARGET iface2 PROPERTY
|
||||||
|
INTERFACE_NON_RELEVANT_PROP ON
|
||||||
|
)
|
||||||
|
set_property(TARGET CompatibleInterface APPEND PROPERTY
|
||||||
|
COMPATIBLE_INTERFACE_BOOL
|
||||||
|
NON_RELEVANT_PROP
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user