From 4d1c02b736f4c1e827b11085cdc83ce4b46c03d1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Jun 2016 16:06:54 +0200 Subject: Add notion of ad hoc group, use to handle DLL/import library --- build2/scope | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build2/scope') diff --git a/build2/scope b/build2/scope index ad9c3a0..3649aa1 100644 --- a/build2/scope +++ b/build2/scope @@ -218,6 +218,20 @@ namespace build2 const target_type* find_target_type (name&, const string*& ext) const; + // Dynamically derive a new target type from an existing one. Return the + // reference to the target type and an indicator of whether it was + // actually created. + // + pair, bool> + derive_target_type (const string& name, const target_type& base); + + template + pair, bool> + derive_target_type (const string& name) + { + return derive_target_type (name, T::static_type); + } + // Rules. // public: -- cgit v1.1