]> git.tdb.fi Git - builder.git/blob - source/buildercli.h
Remove most container typedefs and refactor others
[builder.git] / source / buildercli.h
1 #ifndef BUILDERCLI_H_
2 #define BUILDERCLI_H_
3
4 #include <msp/core/application.h>
5 #include "builder.h"
6
7 class Analyzer;
8
9 /**
10 Provides a command-line interface for Builder.
11 */
12 class BuilderCLI: public Msp::RegisteredApplication<BuilderCLI>
13 {
14 private:
15         std::list<std::string> cmdline_targets;
16         Config::InputOptions cmdline_options;
17         Msp::FS::Path cwd;
18
19         Builder builder;
20         Logger logger;
21         Analyzer *analyzer;
22         bool build;
23         unsigned clean;
24         bool dry_run;
25         bool help;
26         std::string helpmsg;
27         bool show_progress;
28         std::string build_file;
29         unsigned jobs;
30         std::list<std::string> what_if;
31         bool conf_all;
32         bool conf_only;
33         bool build_all;
34         bool create_makefile;
35
36 public:
37         BuilderCLI(int, char **);
38         ~BuilderCLI();
39
40         int main() override;
41
42 private:
43         bool prepare_build();
44         Target *resolve_target(const std::string &);
45
46         void package_help();
47 };
48
49 #endif