summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2018-04-13 05:42:04 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2018-04-23 05:31:19 (GMT)
commit24182325860e058f59e2a01bbde92e735dd8357b (patch)
treef1b48fa03960776d7feed28cdc90157ab482e7bc /Source/cmGeneratorTarget.cxx
parent1f372ac4e52ac7de65d3fc855b280388b70203f3 (diff)
downloadCMake-24182325860e058f59e2a01bbde92e735dd8357b.zip
CMake-24182325860e058f59e2a01bbde92e735dd8357b.tar.gz
CMake-24182325860e058f59e2a01bbde92e735dd8357b.tar.bz2
cmGeneratorTarget: change GetManagedType() result if language is CSharp
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 0cb299c..bf5ff65 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5530,7 +5530,9 @@ cmGeneratorTarget::ManagedType cmGeneratorTarget::GetManagedType(
return this->CheckManagedType(clr);
}
- // TODO: need to check if target is a CSharp target here.
- // If yes: return ManagedType::Managed.
- return ManagedType::Native;
+ // C# targets are always managed. This language specific check
+ // is added to avoid that the COMMON_LANGUAGE_RUNTIME target property
+ // has to be set manually for C# targets.
+ return this->HasLanguage("CSharp", config) ? ManagedType::Managed
+ : ManagedType::Native;
}