summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-12-29 18:53:59 (GMT)
committerEvan Martin <martine@danga.com>2013-04-08 21:45:06 (GMT)
commit695a8e5704d390c84737292b06a2ec97aab52093 (patch)
treec040434bbdef17392046f964f79cddb15efe7125 /src/build.h
parentb6a9a1c8adbb444c2489d884f06e5bd39627c3e9 (diff)
downloadNinja-695a8e5704d390c84737292b06a2ec97aab52093.zip
Ninja-695a8e5704d390c84737292b06a2ec97aab52093.tar.gz
Ninja-695a8e5704d390c84737292b06a2ec97aab52093.tar.bz2
pass command results via a struct
WaitForCommand now passes all command output via a struct. This will allow adding more output in a future change.
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/build.h b/src/build.h
index 5747170..fa73620 100644
--- a/src/build.h
+++ b/src/build.h
@@ -103,8 +103,17 @@ struct CommandRunner {
virtual ~CommandRunner() {}
virtual bool CanRunMore() = 0;
virtual bool StartCommand(Edge* edge) = 0;
- /// Wait for a command to complete.
- virtual Edge* WaitForCommand(ExitStatus* status, string* output) = 0;
+
+ /// The result of waiting for a command.
+ struct Result {
+ Result() : edge(NULL) {}
+ Edge* edge;
+ ExitStatus status;
+ string output;
+ };
+ /// Wait for a command to complete, or return false if interrupted.
+ virtual bool WaitForCommand(Result* result) = 0;
+
virtual vector<Edge*> GetActiveEdges() { return vector<Edge*>(); }
virtual void Abort() {}
};