| 123456789101112131415161718192021222324252627282930313233343536 |
- #pragma once
- #include "ghc/filesystem.hpp"
- namespace build {
- namespace fs = ghc::filesystem;
- /**
- * A simple opaque typedef which allows us to perform type-sensitive
- * output while creating the command string to be invoked.
- * For example, command_builder << output_file would automagically
- * know to output the tokens: ["-o", output_file.get()].
- */
- template <typename T, typename> class named_type {
- private:
- T value_;
- public:
- named_type(T const & value) : value_(value) {}
- named_type(T && value) : value_(std::move(value)) {}
- T const & get() const { return value_; }
- operator T const &() const { return value_; }
- };
- struct indent_t {
- int value;
- };
- using source_file = named_type<fs::path, struct source_file_tag>;
- using object_file = named_type<fs::path, struct object_file_tag>;
- using output_file = named_type<fs::path, struct output_file_tag>;
- enum version { none, cxx11, cxx14, cxx17 };
- }
|