Skip to content

Commit 655bf77

Browse files
memshardedczoido
andauthored
conan new default name/version args (#3882)
* conan new default name/version args * Update reference/commands/new.rst Co-authored-by: Carlos Zoido <mrgalleta@gmail.com> --------- Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
1 parent 95108b8 commit 655bf77

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reference/commands/new.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ The available templates are:
100100
Its variables are: ``name``, ``version``
101101

102102

103+
By default, all ``name`` and ``version`` variables are set to ``mypkg`` and ``0.1``, respectively, if not provided by the user.
104+
105+
103106
.. warning::
104107

105108
The output of the predefined built-in templates is **not stable**. It might
@@ -123,6 +126,13 @@ Generates a basic *conanfile.py* that does not implement any custom functionalit
123126
Generates a *conanfile.py* for ``mygame`` that depends on the packages ``math/1.0`` and ``ai/1.3``
124127

125128

129+
.. code-block:: text
130+
131+
$ conan new cmake_lib
132+
133+
Creates a basic CMake library with default package ``name = "mypkg"`` and default package version ``version = "0.1"``
134+
135+
126136
.. code-block:: text
127137
128138
$ conan new cmake_exe -d name=game -d version=1.0 -d requires=math/3.14 -d requires=ai/1.0

0 commit comments

Comments
 (0)