cmGlobalVisualStudioGenerator: Use member 'Version' more directly

This commit is contained in:
Brad King 2024-05-06 14:47:17 -04:00
parent 0bdcf1cb17
commit 88c70dde34
2 changed files with 2 additions and 3 deletions

View File

@ -518,7 +518,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf)
this->DefaultPlatformToolset = this->SelectWindowsCEToolset();
if (this->GetVersion() == cmGlobalVisualStudioGenerator::VSVersion::VS12) {
if (this->Version == cmGlobalVisualStudioGenerator::VSVersion::VS12) {
// VS 12 .NET CF defaults to .NET framework 3.9 for Windows CE.
this->DefaultTargetFrameworkVersion = "v3.9";
this->DefaultTargetFrameworkIdentifier = "WindowsEmbeddedCompact";

View File

@ -403,8 +403,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
std::string mapping;
// On VS 19 and above, always map .NET SDK projects to "Any CPU".
if (target->IsDotNetSdkTarget() &&
this->GetVersion() >= VSVersion::VS16 &&
if (target->IsDotNetSdkTarget() && this->Version >= VSVersion::VS16 &&
!cmGlobalVisualStudio7Generator::IsReservedTarget(
target->GetName())) {
mapping = "Any CPU";