diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-31 18:42:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-31 18:44:07 +0200 |
commit | a84ff43b183181e0a12c6d5e31c1f366d39ce2fe (patch) | |
tree | 3dce54b64fd8e9917ed034a3e2c9e20f057eece4 /build2/variable.txx | |
parent | 89f5bc3b423a1269a60ccca05174226c8de40357 (diff) |
Experimental (and probably broken) pkg-config generation support
Diffstat (limited to 'build2/variable.txx')
-rw-r--r-- | build2/variable.txx | 22 |
1 files changed, 22 insertions, 0 deletions
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 <typename T> + 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 <typename T> |