diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-08 11:44:44 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-09 14:03:42 +0300 |
commit | 4dcc80df759c7ba1ada65b52a8dc6c793d56e4e5 (patch) | |
tree | 07f2436d9e220e8f879f73854426e1b6c8ce379c /mod/build-config-module.hxx | |
parent | 8abf7052b1ac75f46992770c919c8fe16f0f54b9 (diff) |
Display unbuilt configurations on package version details page
Diffstat (limited to 'mod/build-config-module.hxx')
-rw-r--r-- | mod/build-config-module.hxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mod/build-config-module.hxx b/mod/build-config-module.hxx index 0b5b4d0..3ad1a83 100644 --- a/mod/build-config-module.hxx +++ b/mod/build-config-module.hxx @@ -77,6 +77,31 @@ namespace brep static path dash_components_to_path (const string&); + // Configuration/toolchain combination that, in particular, can be used as + // a set value. + // + // Note: contains shallow references to the configuration, toolchain name, + // and version. + // + struct config_toolchain + { + const string& configuration; + const string& toolchain_name; + const bpkg::version& toolchain_version; + + bool + operator< (const config_toolchain& ct) const + { + if (int r = toolchain_name.compare (ct.toolchain_name)) + return r < 0; + + if (toolchain_version != ct.toolchain_version) + return toolchain_version > ct.toolchain_version; + + return configuration.compare (ct.configuration) < 0; + } + }; + protected: // Build configurations. // |