summaryrefslogtreecommitdiffstats
path: root/Help/release/dev
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-11 19:32:13 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-12 19:27:37 (GMT)
commit506fda1cf026a88378589009b62ca8bf633c5197 (patch)
tree2095056002a42332f5e8f2741daa29eb8880db10 /Help/release/dev
parentc2f79c98677d43fb8686f9e4309acddfae8f3dfd (diff)
downloadCMake-506fda1cf026a88378589009b62ca8bf633c5197.zip
CMake-506fda1cf026a88378589009b62ca8bf633c5197.tar.gz
CMake-506fda1cf026a88378589009b62ca8bf633c5197.tar.bz2
Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode
The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `INCLUDE_DIRECTORIES` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of include directories for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Fixes: #17435
Diffstat (limited to 'Help/release/dev')
-rw-r--r--Help/release/dev/extend-compile-language-genex.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Help/release/dev/extend-compile-language-genex.rst b/Help/release/dev/extend-compile-language-genex.rst
index c95c606..7c09376 100644
--- a/Help/release/dev/extend-compile-language-genex.rst
+++ b/Help/release/dev/extend-compile-language-genex.rst
@@ -4,10 +4,11 @@ extend-compile-language-genex
* :ref:`Visual Studio Generators` learned to support the ``COMPILE_LANGUAGE``
:manual:`generator expression <cmake-generator-expressions(7)>` in
target-wide :prop_tgt:`COMPILE_DEFINITIONS`,
- :prop_tgt:`COMPILE_OPTIONS`, and :command:`file(GENERATE)`.
+ :prop_tgt:`INCLUDE_DIRECTORIES`, :prop_tgt:`COMPILE_OPTIONS`, and
+ :command:`file(GENERATE)`.
* The :generator:`Xcode` generator learned to support the ``COMPILE_LANGUAGE``
:manual:`generator expression <cmake-generator-expressions(7)>` in
- target-wide :prop_tgt:`COMPILE_DEFINITIONS`.
- It previously supported only :prop_tgt:`COMPILE_OPTIONS` and
- :command:`file(GENERATE)`.
+ target-wide :prop_tgt:`COMPILE_DEFINITIONS` and
+ :prop_tgt:`INCLUDE_DIRECTORIES`. It previously supported only
+ :prop_tgt:`COMPILE_OPTIONS` and :command:`file(GENERATE)`.