summaryrefslogtreecommitdiffstats
path: root/Help/command/include_directories.rst
diff options
context:
space:
mode:
authorDavid Demelier <markand@malikania.fr>2018-08-21 20:47:04 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-23 20:00:02 (GMT)
commite558ada9774e0b47214d6cf395a7a926a8583ad6 (patch)
tree4f2071089a9d4b7e37fb571a815b5a94a0bd7c52 /Help/command/include_directories.rst
parentb2798594a5010849c84facb929516f5a78fc5ea4 (diff)
downloadCMake-e558ada9774e0b47214d6cf395a7a926a8583ad6.zip
CMake-e558ada9774e0b47214d6cf395a7a926a8583ad6.tar.gz
CMake-e558ada9774e0b47214d6cf395a7a926a8583ad6.tar.bz2
Help: Document alternative to include_directories
Many existing tutorials suggest `include_directories` but that does not handle propagation to dependencies and such. Add a link to its documentation suggesting `target_include_directories` instead.
Diffstat (limited to 'Help/command/include_directories.rst')
-rw-r--r--Help/command/include_directories.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Help/command/include_directories.rst b/Help/command/include_directories.rst
index f694934..e797b5d 100644
--- a/Help/command/include_directories.rst
+++ b/Help/command/include_directories.rst
@@ -33,3 +33,9 @@ Arguments to ``include_directories`` may use "generator expressions" with
the syntax "$<...>". See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
+
+.. note::
+
+ Prefer the :command:`target_include_directories` command to add include
+ directories to individual targets and optionally propagate/export them
+ to dependents.