https://github.com/Kitware/CMake
Revision 506fda1cf026a88378589009b62ca8bf633c5197 authored by Brad King on 11 January 2018, 19:32:13 UTC, committed by Brad King on 12 January 2018, 19:27:37 UTC
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
1 parent c2f79c9
History
Tip revision: 506fda1cf026a88378589009b62ca8bf633c5197 authored by Brad King on 11 January 2018, 19:32:13 UTC
Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode
Tip revision: 506fda1
File Mode Size
.github
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 201 bytes
.clang-tidy -rw-r--r-- 969 bytes
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 64 bytes
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.8 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.4 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 30.5 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 2.1 KB
CTestConfig.cmake -rw-r--r-- 440 bytes
CTestCustom.cmake.in -rw-r--r-- 6.2 KB
CompileFlags.cmake -rw-r--r-- 2.6 KB
Copyright.txt -rw-r--r-- 5.0 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.0 KB
bootstrap -rwxr-xr-x 47.8 KB
cmake_uninstall.cmake.in -rw-r--r-- 790 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top