summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2018-03-19 20:21:57 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2018-04-23 05:31:22 (GMT)
commitf3c6828876f2f0dd8408868d90db1c4b323cba02 (patch)
treef2c146d9b938d0f403756a69e50c48f58ff2ad13 /Source/cmVisualStudio10TargetGenerator.cxx
parentf9042d807db3264772dc08452195809b1f7a3a0c (diff)
downloadCMake-f3c6828876f2f0dd8408868d90db1c4b323cba02.zip
CMake-f3c6828876f2f0dd8408868d90db1c4b323cba02.tar.gz
CMake-f3c6828876f2f0dd8408868d90db1c4b323cba02.tar.bz2
cmVisualStudio10TargetGenerator: /clr compatible flags for managed tgt
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f52e79a..4dabb4c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2550,10 +2550,15 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
if (this->ProjectType != csproj && clOptions.IsManaged()) {
this->Managed = true;
std::string managedType = clOptions.GetFlag("CompileAsManaged");
- if (managedType == "Safe") {
+ if (managedType == "Safe" || managedType == "Pure") {
// force empty calling convention if safe clr is used
clOptions.AddFlag("CallingConvention", "");
}
+ // The default values of these flags are incompatible to
+ // managed assemblies. We have to force valid values if
+ // the target is a managed C++ target.
+ clOptions.AddFlag("ExceptionHandling", "Async");
+ clOptions.AddFlag("BasicRuntimeChecks", "Default");
}
if (this->ProjectType == csproj) {
// /nowin32manifest overrides /win32manifest: parameter