]> git.tdb.fi Git - builder.git/blob - source/lib/binary.h
Don't busyloop while waiting for an internal task to complete
[builder.git] / source / lib / binary.h
1 #ifndef BINARY_H_
2 #define BINARY_H_
3
4 #include "buildinfo.h"
5 #include "filetarget.h"
6 #include "libbuilder_api.h"
7
8 class Component;
9 class ObjectFile;
10
11 /**
12 Produces a binary file, which may be either a standalone executable or a shared
13 library.
14 */
15 class LIBBUILDER_API Binary: public FileTarget
16 {
17 private:
18         BuildInfo static_binfo;
19
20 protected:
21         std::vector<ObjectFile *> objects;
22
23         Binary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
24         Binary(Builder &, const Component &, const std::string &, const std::vector<ObjectFile *> &);
25
26 public:
27         const std::vector<ObjectFile *> &get_objects() const { return objects; }
28         void collect_build_info(BuildInfo &) const override;
29
30 protected:
31         void find_dependencies() override;
32 private:
33         void find_dependencies(Target *, std::vector<Target *> &, std::vector<Target *> &, std::vector<std::string> &);
34 };
35
36 #endif