From 6ecaa7e76c91a2842bcc63626a908bb2340b77b6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 22 Jun 2015 09:24:12 +0200 Subject: Remove prerequisite rewriting for c/cxx chaining --- build/algorithm.ixx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'build/algorithm.ixx') diff --git a/build/algorithm.ixx b/build/algorithm.ixx index 9435b2e..3907209 100644 --- a/build/algorithm.ixx +++ b/build/algorithm.ixx @@ -11,12 +11,31 @@ namespace build search (prerequisite& p) { if (p.target == nullptr) - p.target = &search ( - prerequisite_key {{&p.type, &p.dir, &p.name, &p.ext}, &p.scope}); + p.target = &search (p.key ()); return *p.target; } + inline target& + search (const target_type& type, + const dir_path& dir, + const std::string& name, + const std::string* ext, + scope* scope) + { + return search (prerequisite_key {{&type, &dir, &name, &ext}, scope}); + } + + template + inline T& + search (const dir_path& dir, + const std::string& name, + const std::string* ext, + scope* scope) + { + return static_cast (search (T::static_type, dir, name, ext, scope)); + } + void match_impl (action, target&); -- cgit v1.1