From 33a565ce5904e545aa77febad74f70a4848435bc Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Tue, 9 Jun 2009 16:02:19 +1000 Subject: Bug 4064 - Having file include itself == BAD Problem is that mcpp doesn't return non-zero status, even though it reports a fatal error. Added work-around that parses mcpp error output and, if a line contains "error:", sets the status to 1. --- cpp/src/Slice/Preprocessor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpp/src/Slice/Preprocessor.cpp') diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 832f0ae5756..c4ec27452e3 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -173,6 +173,14 @@ Slice::Preprocessor::preprocess(bool keepComments) for(vector::const_iterator i = messages.begin(); i != messages.end(); ++i) { emitRaw(i->c_str()); + + // + // MCPP FIX: mcpp does not always return non-zero exit status when there is an error. + // + if(i->find("error:") != string::npos) + { + status = 1; + } } } -- cgit v1.2.3