summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-12-17 16:11:55 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-12-17 16:11:55 (GMT)
commit66e79175327249aa2f0c80f5bd4a360b5b628bff (patch)
treecdeb74d2df2d8a3833921471b9ff9b4b1d962582 /Source/cmLocalVisualStudioGenerator.cxx
parentd11c70295b072d19c90c3e5d415d27de10253615 (diff)
downloadCMake-66e79175327249aa2f0c80f5bd4a360b5b628bff.zip
CMake-66e79175327249aa2f0c80f5bd4a360b5b628bff.tar.gz
CMake-66e79175327249aa2f0c80f5bd4a360b5b628bff.tar.bz2
VS10: stop build on custom command error (#11533)
In VS9 and previous versions, :VCReportError is the goto label to jump to after a failed custom command. It stops the build before it tries to go any further. In VS10, :VCEnd is the correct label to use. Create a method in the VS generators to provide the correct line of script to use for each version of Visual Studio. For more internal details, search for VCEnd in the C:\Program Files\MSBuild directory.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index ed0b07f..8eddc43 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -149,6 +149,18 @@ void cmLocalVisualStudioGenerator::ComputeObjectNameRequirements
}
//----------------------------------------------------------------------------
+std::string cmLocalVisualStudioGenerator::CheckForErrorLine()
+{
+ return "if errorlevel 1 goto :VCReportError";
+}
+
+//----------------------------------------------------------------------------
+std::string cmLocalVisualStudioGenerator::GetCheckForErrorLine()
+{
+ return this->CheckForErrorLine();
+}
+
+//----------------------------------------------------------------------------
std::string
cmLocalVisualStudioGenerator
::ConstructScript(const cmCustomCommandLines& commandLines,
@@ -237,7 +249,7 @@ cmLocalVisualStudioGenerator
// sequence.
//
script += newline_text;
- script += "if errorlevel 1 goto VCReportError";
+ script += this->GetCheckForErrorLine();
}
return script;