diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-29 23:55:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-30 23:57:17 +0300 |
commit | 8f3d3956b1e837c726859eb8bbe19dad79c54a42 (patch) | |
tree | 81ded52db212b12c7f685165702cce90aa0233cf /libbrep/build.cxx | |
parent | ea60a6df471706a0eeb5ff1f774d69abe89e4bc9 (diff) |
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'libbrep/build.cxx')
-rw-r--r-- | libbrep/build.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libbrep/build.cxx b/libbrep/build.cxx new file mode 100644 index 0000000..710c0b2 --- /dev/null +++ b/libbrep/build.cxx @@ -0,0 +1,48 @@ +// file : libbrep/build.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#include <libbrep/build.hxx> + +namespace brep +{ + // build_state + // + string + to_string (build_state s) + { + switch (s) + { + case build_state::untested: return "untested"; + case build_state::testing: return "testing"; + case build_state::tested: return "tested"; + } + + return string (); // Should never reach. + } + + build_state + to_build_state (const string& s) + { + if (s == "untested") return build_state::untested; + else if (s == "testing") return build_state::testing; + else if (s == "tested") return build_state::tested; + else throw invalid_argument ("invalid build state '" + s + "'"); + } + + // build + // + build:: + build (string pnm, version pvr, string cfg, string mnm, string msm) + : id (package_id (move (pnm), pvr), move (cfg)), + package_name (id.package.name), + package_version (move (pvr)), + configuration (id.configuration), + state (build_state::testing), + timestamp (timestamp_type::clock::now ()), + forced (false), + machine (move (mnm)), + machine_summary (move (msm)) + { + } +} |