]> git.tdb.fi Git - builder.git/blobdiff - source/tool.h
Avoid a double verb in function name
[builder.git] / source / tool.h
index 73be90d30a34a92f18235d9f9ece3d29f623318d..042199e54b79342c10e967f7b6de00a6e474554c 100644 (file)
@@ -32,6 +32,7 @@ protected:
        SuffixList aux_suffixes;
        SearchPath system_path;
        bool prepared;
+       std::list<std::string> problems;
 
        Tool(Builder &, const std::string &);
        Tool(Builder &, const Architecture &, const std::string &);
@@ -85,7 +86,14 @@ public:
 protected:
        virtual void do_prepare() { }
 
+       /** Locates an executable for the tool from the VFS.  If it isn't found, a
+       problem is reported.  If cross is true and the architecture is not native,
+       a cross prefix is added to the command. */
+       void set_executable(const std::string &command, bool cross = false);
+
 public:
+       const std::list<std::string> &get_problems() const { return problems; }
+
        /** Invokes the tool to build a target.  This should not be called directly;
        use Target::build() instead. */
        virtual Task *run(const Target &) const = 0;