mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 06:10:16 +08:00
cmVisualStudio10TargetGenerator: /clr compatible flags for managed tgt
This commit is contained in:
@@ -2550,10 +2550,15 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
|||||||
if (this->ProjectType != csproj && clOptions.IsManaged()) {
|
if (this->ProjectType != csproj && clOptions.IsManaged()) {
|
||||||
this->Managed = true;
|
this->Managed = true;
|
||||||
std::string managedType = clOptions.GetFlag("CompileAsManaged");
|
std::string managedType = clOptions.GetFlag("CompileAsManaged");
|
||||||
if (managedType == "Safe") {
|
if (managedType == "Safe" || managedType == "Pure") {
|
||||||
// force empty calling convention if safe clr is used
|
// force empty calling convention if safe clr is used
|
||||||
clOptions.AddFlag("CallingConvention", "");
|
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) {
|
if (this->ProjectType == csproj) {
|
||||||
// /nowin32manifest overrides /win32manifest: parameter
|
// /nowin32manifest overrides /win32manifest: parameter
|
||||||
|
Reference in New Issue
Block a user