// file : libbbot/build-config.hxx -*- C++ -*- // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #ifndef LIBBBOT_BUILD_CONFIG_HXX #define LIBBBOT_BUILD_CONFIG_HXX #include #include #include #include #include #include #include #include namespace bbot { // Build configuration matching specific machine names. Used by bbot // controllers. // struct build_config { std::string machine_pattern; // Machine name pattern. std::string name; // Configuration name. butl::target_triplet target; std::vector vars; // Note: quoting is preserved. // Warning-detecting regular expressions. Note that quoting is preserved. // std::vector warning_regexes; }; using build_configs = std::vector; // 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: // // [] [] // using butl::tab_parsing; LIBBBOT_EXPORT build_configs parse_buildtab (std::istream&, const std::string& name); LIBBBOT_EXPORT build_configs parse_buildtab (const butl::path&); } #endif // LIBBBOT_BUILD_CONFIG_HXX