summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-03 12:04:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-03 12:04:35 (GMT)
commit9fc3024f62304a65c2fb1eaf5303e417530c650d (patch)
treeae35d758ba00f50b6ebaa5ed9634fe467137140a /Source/cmVisualStudio10TargetGenerator.cxx
parenta4b9e59568825a440bbbf04504cb556288aed456 (diff)
parent375b420fdfe4eb34e92b98bb648ba37de3691c2e (diff)
downloadCMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.zip
CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.gz
CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.bz2
Merge topic 'fix-csharp-target-type'
375b420fdf CSharp: Fix regression in VS project type selection 8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2427
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index c79b071..16eca96 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2452,10 +2452,12 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
}
// Choose a language whose flags to use for ClCompile.
- static const char* clLangs[] = { "CXX", "C", "Fortran", "CSharp" };
+ static const char* clLangs[] = { "CXX", "C", "Fortran" };
std::string langForClCompile;
- if (std::find(cm::cbegin(clLangs), cm::cend(clLangs), linkLanguage) !=
- cm::cend(clLangs)) {
+ if (this->ProjectType == csproj) {
+ langForClCompile = "CSharp";
+ } else if (std::find(cm::cbegin(clLangs), cm::cend(clLangs), linkLanguage) !=
+ cm::cend(clLangs)) {
langForClCompile = linkLanguage;
} else {
std::set<std::string> languages;