diff options
author | Brad King <brad.king@kitware.com> | 2022-02-03 11:10:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-03 11:21:37 (GMT) |
commit | ec29a6a1a96c7f2a24de9682a656c40ef4061da4 (patch) | |
tree | fb18395c9b98d6c8104a142cd8302707acebe2c7 /Help/prop_tgt | |
parent | 92459258108c0036808f29f83a8503fea18ccee9 (diff) | |
download | CMake-ec29a6a1a96c7f2a24de9682a656c40ef4061da4.zip CMake-ec29a6a1a96c7f2a24de9682a656c40ef4061da4.tar.gz CMake-ec29a6a1a96c7f2a24de9682a656c40ef4061da4.tar.bz2 |
Help: Clarify documentation on SYSTEM include directories
Mention that system include directories are searched after normal
include directories.
Document that `IMPORTED_NO_SYSTEM` and `NO_SYSTEM_FROM_IMPORTED`
do not affect `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`.
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/IMPORTED_NO_SYSTEM.rst | 4 | ||||
-rw-r--r-- | Help/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst | 9 | ||||
-rw-r--r-- | Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst index cc726d1..f6ad3e5 100644 --- a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst +++ b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst @@ -6,7 +6,9 @@ a ``SYSTEM`` library. This has the following effects: * Entries of :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` are not treated as ``SYSTEM`` include directories when compiling consumers, as they - would be by default. + would be by default. Entries of + :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not affected, + and will always be treated as ``SYSTEM`` include directories. 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 diff --git a/Help/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst b/Help/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst index a0a97ad..b37bb0c 100644 --- a/Help/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst +++ b/Help/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst @@ -5,9 +5,12 @@ List of public system include directories for a library. Targets may populate this property to publish the include directories which contain system headers, and therefore should not result in -compiler warnings. The :command:`target_include_directories(SYSTEM)` -command signature populates this property with values given to the -``PUBLIC`` and ``INTERFACE`` keywords. +compiler warnings. Additionally, system include directories are searched +after normal include directories regardless of the order specified. + +The :command:`target_include_directories(SYSTEM)` command signature +populates this property with values given to the ``PUBLIC`` and +``INTERFACE`` keywords. Projects may also get and set the property directly, but must be aware that adding directories to this property does not make those directories used diff --git a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst index e5cc09b..39a13ee 100644 --- a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst +++ b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst @@ -8,7 +8,9 @@ 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. +imported targets as system includes. Either way, entries of +:prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not affected, +and will always be treated as ``SYSTEM`` include directories. This property is initialized by the value of the :variable:`CMAKE_NO_SYSTEM_FROM_IMPORTED` variable if it is set when a target |