diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-20 15:38:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-27 23:12:33 +0300 |
commit | 48d1a2bd4d8e3cc2407cc7b696810a0f4910814a (patch) | |
tree | 3a5cef2316a786355b0a8828da9dcae5fb1e05b3 /tests/buildtab/driver.cxx | |
parent | 05912fbf27846af1f4ca1b824cc39815179d430e (diff) |
Add support for configuration classes in buildtab
Diffstat (limited to 'tests/buildtab/driver.cxx')
-rw-r--r-- | tests/buildtab/driver.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/buildtab/driver.cxx b/tests/buildtab/driver.cxx index 097b3d9..5242fe4 100644 --- a/tests/buildtab/driver.cxx +++ b/tests/buildtab/driver.cxx @@ -26,14 +26,28 @@ try cin.exceptions (ios::failbit | ios::badbit); cout.exceptions (ios::failbit | ios::badbit); - for (const auto& c: parse_buildtab (cin, "cin")) + for (const build_config& c: parse_buildtab (cin, "cin")) { cout << c.machine_pattern << ' ' << c.name << ' ' << c.target; - for (const auto& v: c.vars) + string classes; + for (const string& cs: c.classes) + { + if (!classes.empty ()) + classes += ' '; + + classes += cs; + } + + if (c.classes.size () > 1) + cout << " \"" << classes << '"'; + else + cout << ' ' << classes; + + for (const string& v: c.vars) cout << ' ' << v; - for (const auto& r: c.warning_regexes) + for (const string& r: c.warning_regexes) cout << " ~" << r; cout << '\n'; |