summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorSumit Bhardwaj <bhardwajs@outlook.com>2021-12-16 18:19:40 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-16 20:31:14 (GMT)
commitaca153b104af02ebd140c888928e6e95d1d7f8c1 (patch)
treec214ab1ab64e37d5afbb5aabaa3a7bb8f626f90f /Source/cmVisualStudio10TargetGenerator.cxx
parentb86c6977b11527c31f17a3551d498019fb324fa3 (diff)
downloadCMake-aca153b104af02ebd140c888928e6e95d1d7f8c1.zip
CMake-aca153b104af02ebd140c888928e6e95d1d7f8c1.tar.gz
CMake-aca153b104af02ebd140c888928e6e95d1d7f8c1.tar.bz2
VS: Add custom VCEnd labels only in C# projects
In commit dff98aa9ca (VS: add missing label in C# project-build events, 2021-12-15) the condition for adding our own `VCEnd` label was based on the project being managed or not. Since we support managed C++ projects, switch the condition to be based on whether the project is C#. Issue: #21440
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index e09ac74..9523038 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1571,10 +1571,11 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
}
}
}
- cmLocalVisualStudioGenerator::IsManaged isManaged = (this->Managed)
- ? cmLocalVisualStudioGenerator::IsManaged::Yes
- : cmLocalVisualStudioGenerator::IsManaged::No;
- script += lg->FinishConstructScript(isManaged);
+ cmLocalVisualStudioGenerator::IsCSharp isCSharp =
+ (this->ProjectType == VsProjectType::csproj)
+ ? cmLocalVisualStudioGenerator::IsCSharp::Yes
+ : cmLocalVisualStudioGenerator::IsCSharp::No;
+ script += lg->FinishConstructScript(isCSharp);
if (this->ProjectType == VsProjectType::csproj) {
std::string name = "CustomCommand_" + c + "_" +
cmSystemTools::ComputeStringMD5(sourcePath);
@@ -4308,10 +4309,11 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
}
}
if (!script.empty()) {
- cmLocalVisualStudioGenerator::IsManaged isManaged = (this->Managed)
- ? cmLocalVisualStudioGenerator::IsManaged::Yes
- : cmLocalVisualStudioGenerator::IsManaged::No;
- script += lg->FinishConstructScript(isManaged);
+ cmLocalVisualStudioGenerator::IsCSharp isCSharp =
+ (this->ProjectType == VsProjectType::csproj)
+ ? cmLocalVisualStudioGenerator::IsCSharp::Yes
+ : cmLocalVisualStudioGenerator::IsCSharp::No;
+ script += lg->FinishConstructScript(isCSharp);
}
comment = cmVS10EscapeComment(comment);
if (this->ProjectType != VsProjectType::csproj) {