aboutsummaryrefslogtreecommitdiff
path: root/bdep/new.cli
blob: 6bbf07ec527db6fddeda02073bc72c0a935727a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// file      : bdep/new.cli
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

include <bdep/project.cli>;
include <bdep/new-types.hxx>;

"\section=1"
"\name=bdep-new"
"\summary=create and initialize new project"

namespace bdep
{
  {
    "<options> <spec> <name>
     <type> <type-opt>
     <lang> <lang-opt>
     <cfg-name> <cfg-dir>
     <cfg-args> <cfg-var> <module>",

    "\h|SYNOPSIS|

     \c{\b{bdep new} [<options>] [\b{--no-init}] <spec> <name>\n
        \b{bdep new} [<options>] \b{--config-add|-A} <cfg-dir> [\b{@}<cfg-name>] <spec> <name>\n
        \b{bdep new} [<options>] \b{--config-create|-C} <cfg-dir> [\b{@}<cfg-name>] <spec> <name>\n
        \ \ \ \ \ \ \ \ \ [<cfg-args>]}

     \c{<spec> = [<type>] [<lang>]\n
        <type> = \b{--type}|\b{-t} (\b{exe}|\b{lib}|\b{bare})[\b{,}<type-opt>...]\n
        <lang> = \b{--lang}|\b{-l} (\b{c}|\b{c++})[\b{,}<lang-opt>...]\n
        <cfg-args> = (<module> | <cfg-var>)...}

     \h|DESCRIPTION|

     The \cb{new} command...

     The first form, unless the \cb{--no-init} is specified, initializes
     an empty configuration set, as if by performing \cb{init --empty}.

     Recognized \cb{c++} language options:

     \dl|

     \li|\cb{cxx}

         Use the \cb{.cxx}, \cb{.hxx}, \cb{.ixx}, \cb{.txx}, and \cb{.mxx}
         source file extensions (default).|

     \li|\cb{cpp}

         Use the \cb{.cpp}, \cb{.hpp}, \cb{.ipp}, \cb{.tpp}, and \cb{.mpp}
         source file extensions.||
     "
  }

  //--type options
  //
  class cmd_new_exe_options
  {
  };

  class cmd_new_lib_options
  {
  };

  class cmd_new_bare_options
  {
  };

  // --lang options
  //
  class cmd_new_c_options
  {
  };

  class cmd_new_cxx_options
  {
    bool cpp;
    bool cxx;
  };

  class cmd_new_options: configuration_name_options
  {
    "\h|NEW OPTIONS|"

    bool --no-init
    {
      "Don't initialize an empty build configuration set."
    }

    dir_path --config-add|-A
    {
      "<dir>",
      "Add an existing build configuration <dir>."
    }

    dir_path --config-create|-C
    {
      "<dir>",
      "Create a new build configuration in <dir>."
    }

    cmd_new_type --type|-t
    {
      "<type>[,<opt>...]",
      "Specify project type and options. Valid values for <type> are \cb{exe}
       (executable project) \cb{lib} (library project), and \cb{bare} (bare
       project without any source code, default). Valid values for <opt> are
       type-specific."
    }

    cmd_new_lang --lang|-l
    {
      "<lang>[,<opt>...]",
      "Specify language type and options. Valid values for <lang> are \cb{c},
       and \cb{c++} (default). Valid values for <opt> are language-specific."
    }

    bool --no-git
    {
      "Don't initialize a \cb{git(1)} repository inside the project nor
       generate any \cb{.gitignore} files."
    }

    bool --default
    {
      "Make the added or created configuration the default. Only valid with
       \cb{--config-add} or \cb{--config-create}, see \l{bdep-config(1)} for
       details."
    }

    bool --no-default
    {
      "Don't make the first added or created configuration then default. Only
       valid with \cb{--config-add} or \cb{--config-create}, see
       \l{bdep-config(1)} for details."
    }
  };
}