CMake/Tests/CMakeCommands
Brad King 506fda1cf0 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
2018-01-12 14:27:37 -05:00
..
add_compile_options
target_compile_definitions Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and Xcode 2018-01-12 14:27:37 -05:00
target_compile_features CompileFeatures: Makes tests work with meta-feature only 2017-05-29 13:51:45 -04:00
target_compile_options Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual Studio 2017-11-20 13:51:25 -05:00
target_include_directories Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode 2018-01-12 14:27:37 -05:00
target_link_libraries