diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-10-28 23:21:29 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-11-23 19:20:35 +0300 |
commit | 03c931e54e618221b69cfcd3dfb462e50ecad780 (patch) | |
tree | e9fa949151f518f0fdfb05db473fc538f20310ff /libbrep/common.cxx | |
parent | 5bf2dd09110f257acc730eab71301e1dede1c710 (diff) |
Add support for package build configurations
Diffstat (limited to 'libbrep/common.cxx')
-rw-r--r-- | libbrep/common.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbrep/common.cxx b/libbrep/common.cxx index 4f729a3..c97a346 100644 --- a/libbrep/common.cxx +++ b/libbrep/common.cxx @@ -32,4 +32,14 @@ namespace brep else if (r == "unbuildable") return unbuildable_reason::unbuildable; else throw invalid_argument ("invalid unbuildable reason '" + r + '\''); } + + build_package_config* + find (const string& name, build_package_configs& cs) + { + auto i (find_if (cs.begin (), cs.end (), + [&name] (const build_package_config& c) + {return c.name == name;})); + + return i != cs.end () ? &*i : nullptr; + } } |