diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-02-21 06:24:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-02-21 06:24:27 +0200 |
commit | a7a3cf206851b5896d938efa34a142aa1f0649b0 (patch) | |
tree | 9a4f09fb7fc764ddef284e5d011afc27a9b4fe4c /libbuild2/cmdline.hxx | |
parent | 24adee85717a9bc61013b6b12fd81135d856d33d (diff) |
Factor additional logic to parse_cmdline()
Diffstat (limited to 'libbuild2/cmdline.hxx')
-rw-r--r-- | libbuild2/cmdline.hxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libbuild2/cmdline.hxx b/libbuild2/cmdline.hxx index 7bf41c2..56e9510 100644 --- a/libbuild2/cmdline.hxx +++ b/libbuild2/cmdline.hxx @@ -19,11 +19,26 @@ namespace build2 { strings cmd_vars; string buildspec; - uint16_t verbosity; + + // Processed/meged option values (unless --help or --version specified). + // + uint16_t verbosity = 1; + optional<bool> progress; + optional<bool> mtime_check; + optional<path> config_sub; + optional<path> config_guess; + size_t jobs = 0; + size_t max_jobs = 0; + optional<size_t> max_stack; + bool fcache_compress = true; }; LIBBUILD2_SYMEXPORT cmdline - parse_cmdline (tracer&, int argc, char* argv[], options&); + parse_cmdline (tracer&, + int argc, char* argv[], + options&, + uint16_t default_verbosity = 1, + size_t default_jobs = 0); } #endif // LIBBUILD2_CMDLINE_HXX |