summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-02 22:41:20 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-02 23:06:39 (GMT)
commit13a7ae2194d44f955712d65fecf0b741049da00e (patch)
tree6dc6cd3a86339ee588aab1860f9a165bd5f319a0 /Source/cmLocalVisualStudioGenerator.cxx
parenteeaf1e10cb5f736692136cb31c4ffbb717599917 (diff)
downloadCMake-13a7ae2194d44f955712d65fecf0b741049da00e.zip
CMake-13a7ae2194d44f955712d65fecf0b741049da00e.tar.gz
CMake-13a7ae2194d44f955712d65fecf0b741049da00e.tar.bz2
VS: Revert "Add missing label in C# project-build events"
Revert commit b284a21fee (VS: Add missing label in C# project-build events, 2021-09-03, v3.22.0-rc1~156^2). The change broke cases using multiple successful custom commands. Revert it pending further investigation into the interaction of the generated script code with `Microsoft.Common.CurrentVersion.targets`, and whether this is needed for all managed projects or just C# projects. Also add a test covering the case that was broken. Fixes: #22964 Issue: #21440
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 4ed1dd9..03213ef 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -124,8 +124,7 @@ const char* cmLocalVisualStudioGenerator::GetReportErrorLabel() const
}
std::string cmLocalVisualStudioGenerator::ConstructScript(
- cmCustomCommandGenerator const& ccg, IsManaged isManaged,
- const std::string& newline_text)
+ cmCustomCommandGenerator const& ccg, const std::string& newline_text)
{
bool useLocal = this->CustomCommandUseLocal();
std::string workingDirectory = ccg.GetWorkingDirectory();
@@ -238,14 +237,6 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
script += newline;
script += "if %errorlevel% neq 0 goto ";
script += this->GetReportErrorLabel();
- if (isManaged == managed) {
- // These aren't generated by default for C# projects.
- script += newline;
- script += this->GetReportErrorLabel();
- script += newline;
- script += "exit /b 0";
- script += newline;
- }
}
return script;