Help: Clarify INTERFACE_SYSTEM_INCLUDE_DIRECTORIES documentation.

This commit is contained in:
Stephen Kelly 2015-01-23 00:14:32 +01:00
parent ee38062be8
commit 85857e6d1c
1 changed files with 9 additions and 2 deletions

View File

@ -7,8 +7,15 @@ Targets may populate this property to publish the include directories
which contain system headers, and therefore should not result in which contain system headers, and therefore should not result in
compiler warnings. The :command:`target_include_directories(SYSTEM)` compiler warnings. The :command:`target_include_directories(SYSTEM)`
command signature populates this property with values given to the command signature populates this property with values given to the
``PUBLIC`` and ``INTERFACE`` keywords. Projects may also get and set the ``PUBLIC`` and ``INTERFACE`` keywords.
property directly.
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
during compilation. Adding directories to this property marks directories
as ``SYSTEM`` which otherwise would be used in a non-``SYSTEM`` manner. This
can appear similar to 'duplication', so prefer the
high-level :command:`target_include_directories(SYSTEM)` command and avoid
setting the property by low-level means.
When target dependencies are specified using :command:`target_link_libraries`, When target dependencies are specified using :command:`target_link_libraries`,
CMake will read this property from all target dependencies to mark the CMake will read this property from all target dependencies to mark the