INTERFACE_SYSTEM_INCLUDE_DIRECTORIES.rst 1.4 KB

12345678910111213141516171819202122232425262728
  1. INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
  2. ------------------------------------
  3. List of public system include directories for a library.
  4. Targets may populate this property to publish the include directories
  5. which contain system headers, and therefore should not result in
  6. compiler warnings. The :command:`target_include_directories(SYSTEM)`
  7. command signature populates this property with values given to the
  8. ``PUBLIC`` and ``INTERFACE`` keywords.
  9. Projects may also get and set the property directly, but must be aware that
  10. adding directories to this property does not make those directories used
  11. during compilation. Adding directories to this property marks directories
  12. as ``SYSTEM`` which otherwise would be used in a non-``SYSTEM`` manner. This
  13. can appear similar to 'duplication', so prefer the
  14. high-level :command:`target_include_directories(SYSTEM)` command and avoid
  15. setting the property by low-level means.
  16. When target dependencies are specified using :command:`target_link_libraries`,
  17. CMake will read this property from all target dependencies to mark the
  18. same include directories as containing system headers.
  19. Contents of ``INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`` may use "generator
  20. expressions" with the syntax ``$<...>``. See the
  21. :manual:`cmake-generator-expressions(7)` manual for available expressions.
  22. See the :manual:`cmake-buildsystem(7)` manual for more on defining
  23. buildsystem properties.