From a84ff43b183181e0a12c6d5e31c1f366d39ce2fe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 31 Jul 2017 18:42:47 +0200 Subject: Experimental (and probably broken) pkg-config generation support --- build2/variable.txx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'build2/variable.txx') diff --git a/build2/variable.txx b/build2/variable.txx index 1373948..f75ffd6 100644 --- a/build2/variable.txx +++ b/build2/variable.txx @@ -6,6 +6,28 @@ namespace build2 { + template + bool lookup:: + belongs (const T& x, bool t) const + { + if (vars == &x.vars) + return true; + + if (t) + { + for (const auto& p1: x.target_vars) // variable_type_map + { + for (const auto& p2: p1.second) // variable_pattern_map + { + if (vars == &p2.second) + return true; + } + } + } + + return false; + } + // This one will be SFINAE'd out unless T is a simple value. // template -- cgit v1.1