diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2008-04-25 17:23:55 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2008-04-25 17:23:55 +0000 |
| commit | 0864e205a9e58039a31c7c7795cb76ba0fe1dea2 (patch) | |
| tree | fa6f7eac9510c0920f1686a36ff54f5dfc9ef5dc /buildtool.cpp | |
| parent | More documentation and cleanup. Marching forward! (diff) | |
| download | inkscape-0864e205a9e58039a31c7c7795cb76ba0fe1dea2.tar.gz inkscape-0864e205a9e58039a31c7c7795cb76ba0fe1dea2.zip | |
Add a "continueOnError" flag to TaskCC. If there is an error in one of the files, it will continue with other files, but the final result will still be an error.
(bzr r5517)
Diffstat (limited to 'buildtool.cpp')
| -rw-r--r-- | buildtool.cpp | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/buildtool.cpp b/buildtool.cpp index 21a7a4aef..2556cd837 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -38,7 +38,7 @@ * */ -#define BUILDTOOL_VERSION "BuildTool v0.8.1, 2007-2008 Bob Jamison" +#define BUILDTOOL_VERSION "BuildTool v0.8.2, 2007-2008 Bob Jamison" #include <stdio.h> #include <fcntl.h> @@ -6161,14 +6161,16 @@ public: TaskCC(MakeBase &par) : Task(par) { - type = TASK_CC; name = "cc"; - ccCommand = "gcc"; - cxxCommand = "g++"; - source = "."; - dest = "."; - flags = ""; - defines = ""; - includes = ""; + type = TASK_CC; + name = "cc"; + ccCommand = "gcc"; + cxxCommand = "g++"; + source = "."; + dest = "."; + flags = ""; + defines = ""; + includes = ""; + continueOnError = false; fileSet.clear(); excludeInc.clear(); } @@ -6249,6 +6251,11 @@ public: dname.append(dirName); incs.append(parent.resolve(dname)); } + + /** + * Compile each of the C files that need it + */ + bool errorOccurred = false; std::vector<String> cfiles; for (viter=deps.begin() ; viter!=deps.end() ; viter++) { @@ -6384,9 +6391,10 @@ public: if (!ret) { error("problem compiling: %s", errString.c_str()); - return false; + errorOccurred = true; } - + if (errorOccurred || !continueOnError) + break; } if (f) @@ -6394,7 +6402,7 @@ public: fclose(f); } - return true; + return errorOccurred; } virtual bool parse(Element *elem) @@ -6412,6 +6420,10 @@ public: if (!parent.getAttribute(elem, "destdir", s)) return false; if (s.size()>0) dest = s; + if (!parent.getAttribute(elem, "continueOnError", s)) + return false; + if (s=="true" || s=="yes") + continueOnError = true; std::vector<Element *> children = elem->getChildren(); for (unsigned int i=0 ; i<children.size() ; i++) @@ -6462,6 +6474,7 @@ protected: String lastflags; String defines; String includes; + bool continueOnError; FileSet fileSet; FileList excludeInc; |
