From e558ada9774e0b47214d6cf395a7a926a8583ad6 Mon Sep 17 00:00:00 2001 From: David Demelier Date: Tue, 21 Aug 2018 22:47:04 +0200 Subject: 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. --- Help/command/include_directories.rst | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- cgit v0.12