summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-11 16:23:06 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-12 19:27:37 (GMT)
commitc2f79c98677d43fb8686f9e4309acddfae8f3dfd (patch)
tree9c4cd2e7ece8bfd90aa13a23c4caa154ce95a1e4 /Source/cmVisualStudio10TargetGenerator.h
parent0795d25b78d5b7682aea091d260eaf1bca7afd0a (diff)
downloadCMake-c2f79c98677d43fb8686f9e4309acddfae8f3dfd.zip
CMake-c2f79c98677d43fb8686f9e4309acddfae8f3dfd.tar.gz
CMake-c2f79c98677d43fb8686f9e4309acddfae8f3dfd.tar.bz2
Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS 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 `COMPILE_DEFINITIONS` 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 definitions for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Issue: #17435
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.h')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 3f56959..b1a09eb 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -183,6 +183,7 @@ private:
OptionsMap MasmOptions;
OptionsMap NasmOptions;
OptionsMap LinkOptions;
+ std::string LangForClCompile;
std::string PathToProjectFile;
std::string ProjectFileExtension;
enum VsProjectType