diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-15 16:47:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-15 16:47:05 +0200 |
commit | 602b71ed970b8ca9fea19c0103be7a977179d50d (patch) | |
tree | 6d8bb45408b9ee7c09a3e91d975bb01d7f56878a /bdep/new-types.hxx | |
parent | 0c2a4d6c3c832671a1f5647ab1b095adef2e985e (diff) |
Implement support for empty project type
Diffstat (limited to 'bdep/new-types.hxx')
-rw-r--r-- | bdep/new-types.hxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bdep/new-types.hxx b/bdep/new-types.hxx index 616b87e..1b31027 100644 --- a/bdep/new-types.hxx +++ b/bdep/new-types.hxx @@ -18,13 +18,15 @@ namespace bdep class cmd_new_exe_options; class cmd_new_lib_options; class cmd_new_bare_options; + class cmd_new_empty_options; - template <typename EXE = cmd_new_exe_options, - typename LIB = cmd_new_lib_options, - typename BARE = cmd_new_bare_options> + template <typename EXE = cmd_new_exe_options, + typename LIB = cmd_new_lib_options, + typename BARE = cmd_new_bare_options, + typename EMPTY = cmd_new_empty_options> struct cmd_new_type_template { - enum type_type {exe, lib, bare} type; + enum type_type {exe, lib, bare, empty} type; operator type_type () const {return type;} @@ -32,12 +34,13 @@ namespace bdep { EXE exe_opt; LIB lib_opt; - BARE bare_opt; + BARE bare_opt; + EMPTY empty_opt; }; // Default is exe with no options. // - cmd_new_type_template (): type (exe) {bare_opt = BARE ();} + cmd_new_type_template (): type (exe) {exe_opt = EXE ();} friend ostream& operator<< (ostream& os, const cmd_new_type_template& t) @@ -46,9 +49,10 @@ namespace bdep switch (t) { - case type::exe: return os << "executable"; - case type::lib: return os << "library"; - case type::bare: return os << "bare"; + case type::exe: return os << "executable"; + case type::lib: return os << "library"; + case type::bare: return os << "bare"; + case type::empty: return os << "empty"; } return os; |