summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorSteven Boswell <ulatekh@yahoo.com>2021-09-03 21:06:27 (GMT)
committerBrad King <brad.king@kitware.com>2021-09-09 18:22:26 (GMT)
commitb284a21fee0907effe08a4314ffa725aa0c7c86e (patch)
treef46dd314bd644b685b45309a48b383ccaacddb27 /Source/cmLocalVisualStudioGenerator.cxx
parented9abd99772cbdcb2e4dd195eb4a62104ce86c95 (diff)
downloadCMake-b284a21fee0907effe08a4314ffa725aa0c7c86e.zip
CMake-b284a21fee0907effe08a4314ffa725aa0c7c86e.tar.gz
CMake-b284a21fee0907effe08a4314ffa725aa0c7c86e.tar.bz2
VS: Add missing label in C# project-build events
Fixes: #21440
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 46f9d31..acddfe1 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -124,7 +124,8 @@ const char* cmLocalVisualStudioGenerator::GetReportErrorLabel() const
}
std::string cmLocalVisualStudioGenerator::ConstructScript(
- cmCustomCommandGenerator const& ccg, const std::string& newline_text)
+ cmCustomCommandGenerator const& ccg, IsManaged isManaged,
+ const std::string& newline_text)
{
bool useLocal = this->CustomCommandUseLocal();
std::string workingDirectory = ccg.GetWorkingDirectory();
@@ -236,6 +237,14 @@ 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;