summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorSumit Bhardwaj <bhardwajs@outlook.com>2021-12-24 08:22:29 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-12 17:09:00 (GMT)
commit0682cd36571e8a3c78c6425e9a56647880d8d28b (patch)
tree7dca599f6c4d662f4b98d7b8ae9bd1b0b723c5e2 /Source/cmVisualStudio10TargetGenerator.cxx
parent6ab2c40c174bd4b4063a5a87f29b3bd80a4800b5 (diff)
downloadCMake-0682cd36571e8a3c78c6425e9a56647880d8d28b.zip
CMake-0682cd36571e8a3c78c6425e9a56647880d8d28b.tar.gz
CMake-0682cd36571e8a3c78c6425e9a56647880d8d28b.tar.bz2
VS: Add proj as a project type to VsProjectType
Add `proj` as a project type to VsProjectType so that it can be consumed by `ZERO_CHECK` target. This commit adds the type and cleans up the code that needs to treat `proj` and `csproj` in the same fashion. Next commit will make changes to add `ZERO_CHECK.proj`.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a79337b..1eb55f9 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -248,6 +248,8 @@ static std::string computeProjectFileExtension(VsProjectType projectType)
switch (projectType) {
case VsProjectType::csproj:
return ".csproj";
+ case VsProjectType::proj:
+ return ".proj";
default:
return ".vcxproj";
}
@@ -681,6 +683,8 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
.Attribute("Project", VS10_CSharp_DEFAULT_PROPS)
.Attribute("Condition", "Exists('" VS10_CSharp_DEFAULT_PROPS "')");
break;
+ default:
+ break;
}
this->WriteProjectConfigurationValues(e0);
@@ -737,6 +741,8 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
case VsProjectType::csproj:
props = VS10_CSharp_USER_PROPS;
break;
+ default:
+ break;
}
if (cmValue p = this->GeneratorTarget->GetProperty("VS_USER_PROPS")) {
props = *p;
@@ -779,6 +785,8 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
Elem(e0, "Import").Attribute("Project", VS10_CSharp_TARGETS);
}
break;
+ default:
+ break;
}
this->WriteTargetSpecificReferences(e0);
@@ -3057,6 +3065,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
cm::make_unique<Options>(this->LocalGenerator, Options::CSharpCompiler,
gg->GetCSharpFlagTable());
break;
+ default:
+ break;
}
Options& clOptions = *pOptions;
@@ -3182,6 +3192,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
return def.find('=') != std::string::npos;
});
break;
+ default:
+ break;
}
clOptions.AddDefines(targetDefines);
@@ -4308,6 +4320,9 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
this->AdditionalUsingDirectories[config].insert(
cmSystemTools::GetFilenamePath(location));
break;
+ default:
+ // In .proj files, we wouldn't be referencing libraries.
+ break;
}
}
}