summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-01 11:36:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-01 11:36:39 (GMT)
commitd955b4f753d450ec10a2f928fcca1a91a50816ce (patch)
tree518196d26a2930e7fb89531f8ca235f26c7bade3 /Source/cmVisualStudio10TargetGenerator.cxx
parent75b85133d8cccb5d2680b0817d8720c6860238b0 (diff)
parent9040df31e2da7db351d76dcc72568d44d0223f92 (diff)
downloadCMake-d955b4f753d450ec10a2f928fcca1a91a50816ce.zip
CMake-d955b4f753d450ec10a2f928fcca1a91a50816ce.tar.gz
CMake-d955b4f753d450ec10a2f928fcca1a91a50816ce.tar.bz2
Merge topic 'fix-custom-target-with-csharp'
9040df31e2 Merge branch 'backport-fix-custom-target-with-csharp' 1acd1c2b50 CSharp: Fix regression in VS project type selection for custom target a56edad6d6 CSharp: Fix regression in VS project type selection for custom target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2549
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index eb1a27e..e9a1a67 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -205,12 +205,11 @@ static bool cmVS10IsTargetsFile(std::string const& path)
return cmSystemTools::Strucmp(ext.c_str(), ".targets") == 0;
}
-static std::string computeProjectFileExtension(cmGeneratorTarget const* t,
- const std::string& config)
+static std::string computeProjectFileExtension(cmGeneratorTarget const* t)
{
std::string res;
res = ".vcxproj";
- if (t->HasLanguage("CSharp", config)) {
+ if (t->IsCSharpOnly()) {
res = ".csproj";
}
return res;
@@ -305,8 +304,8 @@ void cmVisualStudio10TargetGenerator::Generate()
this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) {
return;
}
- const std::string ProjectFileExtension = computeProjectFileExtension(
- this->GeneratorTarget, *this->Configurations.begin());
+ const std::string ProjectFileExtension =
+ computeProjectFileExtension(this->GeneratorTarget);
if (ProjectFileExtension == ".vcxproj") {
this->ProjectType = vcxproj;
this->Managed = false;
@@ -1398,8 +1397,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
std::string path = this->LocalGenerator->GetCurrentBinaryDirectory();
path += "/";
path += this->Name;
- path += computeProjectFileExtension(this->GeneratorTarget,
- *this->Configurations.begin());
+ path += computeProjectFileExtension(this->GeneratorTarget);
path += ".filters";
cmGeneratedFileStream fout(path);
fout.SetCopyIfDifferent(true);
@@ -3800,7 +3798,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
path = lg->GetCurrentBinaryDirectory();
path += "/";
path += dt->GetName();
- path += computeProjectFileExtension(dt, *this->Configurations.begin());
+ path += computeProjectFileExtension(dt);
}
ConvertToWindowsSlash(path);
Elem e2(e1, "ProjectReference");
@@ -3826,7 +3824,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
}
// Workaround for static library C# targets
if (referenceNotManaged && dt->GetType() == cmStateEnums::STATIC_LIBRARY) {
- referenceNotManaged = !dt->HasLanguage("CSharp", "");
+ referenceNotManaged = !dt->IsCSharpOnly();
}
if (referenceNotManaged) {
e2.Element("ReferenceOutputAssembly", "false");