1 #ifndef DEPENDENCYCACHE_H_
2 #define DEPENDENCYCACHE_H_
4 #include <msp/time/timestamp.h>
10 Stores dependencies to avoid expensive operations during DAG building phase.
11 The dependencies are stored in a map with target name as key and a list of
12 strings as value. The targets are free to store whatever they want here.
17 typedef std::map<std::string, StringList> DepsMap;
19 SourcePackage &package;
21 Msp::Time::TimeStamp mtime;
25 DependencyCache(SourcePackage &p);
26 void set_deps(const std::string &tgt, const StringList &d);
27 const StringList &get_deps(const std::string &tgt) const;
28 const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
32 Saves the depencency cache. Does nothing if the cache is empty or nothing