From 40e4d161fa319a443c2598ddbc74b8ad31220c68 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Nov 2022 22:14:53 +0300 Subject: Add support for package-config task manifest value --- libbbot/build-target-config.hxx | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 libbbot/build-target-config.hxx (limited to 'libbbot/build-target-config.hxx') diff --git a/libbbot/build-target-config.hxx b/libbbot/build-target-config.hxx new file mode 100644 index 0000000..27b555c --- /dev/null +++ b/libbbot/build-target-config.hxx @@ -0,0 +1,70 @@ +// file : libbbot/build-target-config.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBBOT_BUILD_CONFIG_HXX +#define LIBBBOT_BUILD_CONFIG_HXX + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +namespace bbot +{ + // Build target configuration matching specific machine names. Used by bbot + // controllers. + // + struct build_target_config + { + std::string machine_pattern; // Machine name pattern. + std::string name; // Configuration name. + butl::target_triplet target; // Build target. + butl::optional environment; // Build environment name. + std::vector classes; + std::vector args; // Note: quoting is preserved. + + // Warning-detecting regular expressions. Note that quoting is preserved. + // + std::vector warning_regexes; + }; + + struct build_target_configs: std::vector + { + // List of all target configuration class names. Starts with the all and + // default classes. The rest follows in the same order as in the buildtab. + // + std::vector classes; + + // A map of derived class names to their bases. + // + std::map class_inheritance_map; + }; + + // Parse buildtab stream or file. Throw tab_parsing on parsing error, + // ios::failure on the underlying OS error. + // + // buildtab consists of lines in the following format: + // + // [/] []* []* + // + // Note that each / pair is expected to be unique in + // the buildtab. + // + using butl::tab_parsing; + + LIBBBOT_EXPORT build_target_configs + parse_buildtab (std::istream&, const std::string& name); + + LIBBBOT_EXPORT build_target_configs + parse_buildtab (const butl::path&); +} + +#endif // LIBBBOT_BUILD_CONFIG_HXX -- cgit v1.1