cmake/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst

29 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
NO_SYSTEM_FROM_IMPORTED
-----------------------
2018-01-26 17:06:56 +01:00
Do not treat include directories from the interfaces of consumed
2023-05-23 16:38:00 +02:00
:ref:`imported targets` as system directories.
2014-08-03 19:52:23 +02:00
2018-01-26 17:06:56 +01:00
The contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property
2023-05-23 16:38:00 +02:00
are treated as system includes when the consumed target's :prop_tgt:`SYSTEM`
property is set to true. By default, :prop_tgt:`SYSTEM` is true for imported
targets and false for other target types. If the ``NO_SYSTEM_FROM_IMPORTED``
property is set to true on a *consuming* target, compilation of sources in that
consuming target will not treat the contents of the
:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of consumed imported targets as
system includes, even if that imported target's :prop_tgt:`SYSTEM` property
is false.
Directories listed in the :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`
property of consumed targets are not affected by ``NO_SYSTEM_FROM_IMPORTED``.
Those directories will always be treated as system include directories by
consumers.
2018-01-26 17:06:56 +01:00
This property is initialized by the value of the
:variable:`CMAKE_NO_SYSTEM_FROM_IMPORTED` variable if it is set when a target
is created.
2022-03-29 21:10:50 +02:00
2023-05-23 16:38:00 +02:00
See the :prop_tgt:`EXPORT_NO_SYSTEM` target property to set this behavior
on the target providing the include directories rather than the target
consuming them.