aboutsummaryrefslogtreecommitdiff
path: root/mod/build-config.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-02 19:28:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-05-02 19:28:02 +0300
commit8e54ae94ce44d57b49b35269f006fe2bf07ec13d (patch)
tree2afef6369545ed6222d08b6eddf77ca37212cc64 /mod/build-config.cxx
parent96511bdc00c2e4c17517b0cc3fce50a08683b2a4 (diff)
For external test packages use the 'all' class as default underlying build class set
Diffstat (limited to 'mod/build-config.cxx')
-rw-r--r--mod/build-config.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/mod/build-config.cxx b/mod/build-config.cxx
index 2d64aec..43a85e8 100644
--- a/mod/build-config.cxx
+++ b/mod/build-config.cxx
@@ -13,17 +13,21 @@ namespace brep
using namespace bpkg;
using namespace bbot;
- // The default underlying class set expression (see below).
+ // The default underlying class set expressions (see below).
//
static const build_class_expr default_ucs_expr (
{"default"}, '+', "Default.");
+ static const build_class_expr all_ucs_expr (
+ {"all"}, '+', "All.");
+
bool
exclude (const small_vector<build_class_expr, 1>& exprs,
const vector<build_constraint>& constrs,
const build_config& cfg,
const map<string, string>& class_inheritance_map,
- string* reason)
+ string* reason,
+ bool default_all_ucs)
{
// Save the first sentence of the reason, lower-case the first letter if
// the beginning looks like a word (all subsequent characters until a
@@ -132,9 +136,11 @@ namespace brep
// cannot affect the result.
//
const build_class_expr& ucs_expr (
- ucs != nullptr
- ? build_class_expr (ucs->underlying_classes, '+', ucs->comment)
- : default_ucs_expr);
+ ucs != nullptr ? build_class_expr (ucs->underlying_classes,
+ '+',
+ ucs->comment) :
+ default_all_ucs ? all_ucs_expr :
+ default_ucs_expr);
match (ucs_expr);