summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-03-11 21:54:57 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-03-11 22:04:15 (GMT)
commitaf92e723622a82eeec256b28420bf8c8a31a762b (patch)
tree826120e60a9b677ef36b2f0391c1982517036a86 /Source/cmLocalVisualStudioGenerator.cxx
parent01f022c49c4c8daa830ad7d8fa44fa8c702bcf87 (diff)
downloadCMake-af92e723622a82eeec256b28420bf8c8a31a762b.zip
CMake-af92e723622a82eeec256b28420bf8c8a31a762b.tar.gz
CMake-af92e723622a82eeec256b28420bf8c8a31a762b.tar.bz2
Add errorlevel checking after each custom command in a sequence.
This makes the behavior of the build with the Visual Studio generators equivalent to the behavior of makefile based builds. After an error in a custom command sequence, the build stops and reports an error rather than executing the remaining commands in the sequence.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 83d8dec..f3ed5b6 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -230,7 +230,15 @@ cmLocalVisualStudioGenerator
escapeAllowMakeVars);
}
}
+
+ // After each custom command, check for an error result.
+ // If there was an error, jump to the VCReportError label,
+ // skipping the run of any subsequent commands in this
+ // sequence.
+ //
+ script += newline_text;
+ script += "if errorlevel 1 goto VCReportError";
}
+
return script;
}
-