aboutsummaryrefslogtreecommitdiff
path: root/libbrep/common.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-10-28 23:21:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-11-23 19:20:35 +0300
commit03c931e54e618221b69cfcd3dfb462e50ecad780 (patch)
treee9fa949151f518f0fdfb05db473fc538f20310ff /libbrep/common.cxx
parent5bf2dd09110f257acc730eab71301e1dede1c710 (diff)
Add support for package build configurations
Diffstat (limited to 'libbrep/common.cxx')
-rw-r--r--libbrep/common.cxx10
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;
+ }
}