summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-21 18:59:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-12-21 18:59:35 (GMT)
commit1f401294d4829ff5240b7123e7c2f7e98a2f7775 (patch)
tree484af1efdda4a3482b9482464f7093393440c7cd
parent27b86ece8f400ed7a4f9093e9ba11d63dc8929b8 (diff)
parent66e79175327249aa2f0c80f5bd4a360b5b628bff (diff)
downloadCMake-1f401294d4829ff5240b7123e7c2f7e98a2f7775.zip
CMake-1f401294d4829ff5240b7123e7c2f7e98a2f7775.tar.gz
CMake-1f401294d4829ff5240b7123e7c2f7e98a2f7775.tar.bz2
Merge topic 'fix-11533-vs10-custom-build-err'
66e7917 VS10: stop build on custom command error (#11533)
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx6
-rw-r--r--Source/cmLocalVisualStudio10Generator.h4
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx14
-rw-r--r--Source/cmLocalVisualStudioGenerator.h7
4 files changed, 30 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 57d8653..de2a837 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -117,3 +117,9 @@ void cmLocalVisualStudio10Generator
"Stored GUID",
cmCacheManager::INTERNAL);
}
+
+//----------------------------------------------------------------------------
+std::string cmLocalVisualStudio10Generator::CheckForErrorLine()
+{
+ return "if errorlevel 1 goto :VCEnd";
+}
diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h
index 5694220..06b8b09 100644
--- a/Source/cmLocalVisualStudio10Generator.h
+++ b/Source/cmLocalVisualStudio10Generator.h
@@ -36,6 +36,10 @@ public:
virtual void Generate();
virtual void ReadAndStoreExternalGUID(const char* name,
const char* path);
+
+protected:
+ virtual std::string CheckForErrorLine();
+
private:
};
#endif
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;
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index 6034b22..0019bfb 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -30,6 +30,7 @@ class cmLocalVisualStudioGenerator : public cmLocalGenerator
public:
cmLocalVisualStudioGenerator();
virtual ~cmLocalVisualStudioGenerator();
+
/** Construct a script from the given list of command lines. */
std::string ConstructScript(const cmCustomCommandLines& commandLines,
const char* workingDirectory,
@@ -38,7 +39,13 @@ public:
bool escapeAllowMakeVars,
const char* newline = "\n");
+ /** Line of batch file text that skips to the end after
+ * a failed step in a sequence of custom commands.
+ */
+ std::string GetCheckForErrorLine();
+
protected:
+ virtual std::string CheckForErrorLine();
/** Construct a custom command to make exe import lib dir. */
cmsys::auto_ptr<cmCustomCommand>