1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 19:43:23 +08:00

Help: Clarify SYSTEM property default for imported targets

The `SYSTEM` directory property does not affect imported targets.

Fixes: #24219
This commit is contained in:
Brad King
2022-12-05 19:42:06 -05:00
parent 60fc165dcb
commit b15b9cf286
3 changed files with 7 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ the dependency.
If the ``SYSTEM`` argument is provided, the :prop_dir:`SYSTEM` directory If the ``SYSTEM`` argument is provided, the :prop_dir:`SYSTEM` directory
property of the subdirectory will be set to true. This property is property of the subdirectory will be set to true. This property is
used to initialize the :prop_tgt:`SYSTEM` property of each target used to initialize the :prop_tgt:`SYSTEM` property of each non-imported
created in that subdirectory. The include directories of targets with target created in that subdirectory. The include directories of targets
:prop_tgt:`SYSTEM` set to true will be treated as ``SYSTEM`` when with :prop_tgt:`SYSTEM` set to true will be treated as ``SYSTEM`` when
compiling consumers. compiling consumers.

View File

@@ -4,7 +4,7 @@ SYSTEM
.. versionadded:: 3.25 .. versionadded:: 3.25
This directory property is used to initialize the :prop_tgt:`SYSTEM` This directory property is used to initialize the :prop_tgt:`SYSTEM`
target property for targets created in that directory. It is set to target property for non-imported targets created in that directory.
true by :command:`add_subdirectory` and It is set to true by :command:`add_subdirectory` and
:command:`FetchContent_Declare` when the ``SYSTEM`` option is given :command:`FetchContent_Declare` when the ``SYSTEM`` option is given
as an argument to those commands. as an argument to those commands.

View File

@@ -18,5 +18,5 @@ then their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` will not be
treated as ``SYSTEM``, regardless of the value of the treated as ``SYSTEM``, regardless of the value of the
:prop_tgt:`IMPORTED_NO_SYSTEM` property. :prop_tgt:`IMPORTED_NO_SYSTEM` property.
This target property is initialized from the :prop_dir:`SYSTEM` For non-imported targets, this target property is initialized from
directory property when the target is created. the :prop_dir:`SYSTEM` directory property when the target is created.