mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Help: Clarify documentation of NO_SYSTEM_FROM_IMPORTED
This property is meant to be set on the consumers of imported targets, not the imported targets themselves. Fixes: #17348
This commit is contained in:
@@ -687,7 +687,8 @@ property are treated as ``SYSTEM`` include directories, as if they were
|
||||
listed in the :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` of the
|
||||
dependency. This can result in omission of compiler warnings for headers
|
||||
found in those directories. This behavior for :ref:`imported targets` may
|
||||
be controlled with the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property.
|
||||
be controlled by setting the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target
|
||||
property on the *consumers* of imported targets.
|
||||
|
||||
If a binary target is linked transitively to a Mac OX framework, the
|
||||
``Headers`` directory of the framework is also treated as a usage requirement.
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
NO_SYSTEM_FROM_IMPORTED
|
||||
-----------------------
|
||||
|
||||
Do not treat includes from IMPORTED target interfaces as SYSTEM.
|
||||
Do not treat include directories from the interfaces of consumed
|
||||
:ref:`imported targets` as ``SYSTEM``.
|
||||
|
||||
The contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED targets
|
||||
are treated as SYSTEM includes by default. If this property is
|
||||
enabled, the contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED
|
||||
targets are not treated as system includes. This property is
|
||||
initialized by the value of the variable CMAKE_NO_SYSTEM_FROM_IMPORTED
|
||||
if it is set when a target is created.
|
||||
The contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property
|
||||
of imported targets are treated as ``SYSTEM`` includes by default. If this
|
||||
property is enabled on a target, compilation of sources in that target will
|
||||
not treat the contents of the ``INTERFACE_INCLUDE_DIRECTORIES`` of consumed
|
||||
imported targets as system includes.
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user