aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/scope.cxx')
-rw-r--r--libbuild2/scope.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbuild2/scope.cxx b/libbuild2/scope.cxx
index 51a1c25..be2669d 100644
--- a/libbuild2/scope.cxx
+++ b/libbuild2/scope.cxx
@@ -952,7 +952,9 @@ namespace build2
}
pair<reference_wrapper<const target_type>, bool> scope::
- derive_target_type (const string& name, const target_type& base)
+ derive_target_type (const string& name,
+ const target_type& base,
+ target_type::flag flags)
{
assert (root_scope () == this);
@@ -970,10 +972,13 @@ namespace build2
//
// Currently, if we define myfile{}: file{}, then myfile{foo} and
// myfile{foo.x} are the same target.
+
+ // Note: copies flags.
//
unique_ptr<target_type> dt (new target_type (base));
dt->base = &base;
dt->factory = &derived_tt_factory;
+ dt->flags |= flags;
#if 0
// @@ We should probably inherit the fixed extension unless overriden with