diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-01 21:50:16 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-06 18:42:14 +0300 |
commit | f11d8c32c01ab1ac13268484b9e85732176a47d9 (patch) | |
tree | 960473ad9016458dde5f8a092b9715c77888aaac /libbrep/common.cxx | |
parent | ca708a3f172e2f0ffab8638087b3e478de06b996 (diff) |
Add support for test-exclude task manifest value
Diffstat (limited to 'libbrep/common.cxx')
-rw-r--r-- | libbrep/common.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libbrep/common.cxx b/libbrep/common.cxx index 2e9ff34..8964e0a 100644 --- a/libbrep/common.cxx +++ b/libbrep/common.cxx @@ -6,4 +6,30 @@ namespace brep { const version wildcard_version (0, "0", nullopt, nullopt, 0); + + // unbuildable_reason + // + string + to_string (unbuildable_reason r) + { + switch (r) + { + case unbuildable_reason::stub: return "stub"; + case unbuildable_reason::test: return "test"; + case unbuildable_reason::external: return "external"; + case unbuildable_reason::unbuildable: return "unbuildable"; + } + + return string (); // Should never reach. + } + + unbuildable_reason + to_unbuildable_reason (const string& r) + { + if (r == "stub") return unbuildable_reason::stub; + else if (r == "test") return unbuildable_reason::test; + else if (r == "external") return unbuildable_reason::external; + else if (r == "unbuildable") return unbuildable_reason::unbuildable; + else throw invalid_argument ("invalid unbuildable reason '" + r + "'"); + } } |