cmake/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst

38 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2022-03-29 21:10:50 +02:00
IMPORTED_NO_SYSTEM
------------------
.. versionadded:: 3.23
2022-11-16 20:14:03 +01:00
.. deprecated:: 3.25
2023-05-23 16:38:00 +02:00
``IMPORTED_NO_SYSTEM`` is deprecated. Please use the following alternatives
instead:
2022-11-16 20:14:03 +01:00
2023-05-23 16:38:00 +02:00
* Set :prop_tgt:`SYSTEM` to false if you don't want a target's include
directories to be treated as system directories when compiling consumers.
* Set :prop_tgt:`EXPORT_NO_SYSTEM` to true if you don't want the include
directories of the imported target generated by :command:`install(EXPORT)`
and :command:`export` commands to be treated as system directories when
compiling consumers.
Setting ``IMPORTED_NO_SYSTEM`` to true on an
:ref:`imported target <Imported Targets>` specifies that it is not a
system target. This has the following effects:
2022-03-29 21:10:50 +02:00
* Entries of :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` are not treated
2023-05-23 16:38:00 +02:00
as system include directories when compiling consumers (regardless of
2022-11-16 20:14:03 +01:00
the value of the consumed target's :prop_tgt:`SYSTEM` property), as they
2022-03-29 21:10:50 +02:00
would be by default. Entries of
:prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not affected,
2023-05-23 16:38:00 +02:00
and will always be treated as system include directories.
2023-07-02 19:51:09 +02:00
* On Apple platforms, when the target is a framework, it will not be treated as
system.
2022-03-29 21:10:50 +02:00
This property can also be enabled on a non-imported target. Doing so does
not affect the build system, but does tell the :command:`install(EXPORT)` and
:command:`export` commands to enable it on the imported targets they generate.
See the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property to set this
2023-05-23 16:38:00 +02:00
behavior on the target *consuming* the include directories rather than
the one *providing* them.