Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conan new default name/version args #3882

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions reference/commands/new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ The available templates are:
Its variables are: ``name``, ``version``


By default, all ``name`` and ``version`` variables are set to ``mypkg`` and ``0.1``, respectively, if not provided by the user.


.. warning::

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


.. code-block:: text

$ conan new cmake_lib

Creates a basic CMake library with default package ``name = "mypkg"`` and default package version ``version = "0.1"``


.. code-block:: text

$ conan new cmake_exe -d name=game -d version=1.0 -d requires=math/3.14 -d requires=ai/1.0
Expand Down