diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-09-23 12:21:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:28:02 +0200 |
commit | a64df87aa0cb30d3bbc755fc97eb782388b35b77 (patch) | |
tree | 99742e299d3a873a7fc3400c744efcb21a6ef560 /include | |
parent | 28ebe56853d4ec2d08dcbd5559d3d62bce3295c6 (diff) |
Add build depends
Diffstat (limited to 'include')
-rw-r--r-- | include/ninja/Ninja.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/ninja/Ninja.hpp b/include/ninja/Ninja.hpp index e2b4ab5..d0e3d50 100644 --- a/include/ninja/Ninja.hpp +++ b/include/ninja/Ninja.hpp @@ -69,12 +69,14 @@ namespace ninja const std::string value; }; + class NinjaBuild; + // Functions throw NinjaException on failure class NinjaRule { public: NinjaRule(NinjaBuildFile *buildFile, const std::string &name, const std::string &command); - void build(const std::string &in, const std::string &out, const std::vector<ninja::NinjaArgValue> &additionalArgs); + NinjaBuild* build(const std::string &in, const std::string &out, const std::vector<ninja::NinjaArgValue> &additionalArgs, const std::vector<NinjaBuild*> &dependsOnBuilds = {}); const std::string name; const std::string command; @@ -89,6 +91,7 @@ namespace ninja const std::string in; const std::string out; const std::vector<ninja::NinjaArgValue> additionalArgs; + const std::vector<NinjaBuild*> dependsOnBuilds; }; // Functions throw NinjaException on failure @@ -99,12 +102,12 @@ namespace ninja void defineGlobalVariable(const std::string &name, const std::string &value); NinjaRule* createRule(const std::string &name, const std::vector<NinjaArg> &commandArgs); - void build(const NinjaRule *rule, const std::string &in, const std::string &out, const std::vector<ninja::NinjaArgValue> &additionalArgs); + NinjaBuild* build(const NinjaRule *rule, const std::string &in, const std::string &out, const std::vector<ninja::NinjaArgValue> &additionalArgs, const std::vector<NinjaBuild*> &dependsOnBuilds = {}); std::string generate() const; private: std::unordered_map<std::string, std::string> globalVariables; std::unordered_map<std::string, NinjaRule*> rules; - std::vector<NinjaBuild> builds; + std::vector<NinjaBuild*> builds; }; }
\ No newline at end of file |