Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 8 additions & 2 deletions reference/commands/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ You can force certain files to be copied over by using the ``!`` negation syntax

$ conan config install http://github.com/user/conan_config/.git --type git

- Install the configuration from a specific Git branch:

.. code-block:: text

$ conan config install http://github.com/user/conan_config/.git --args="--branch mybranch"

- Install from a URL skipping SSL verification:

.. code-block:: text
Expand Down Expand Up @@ -144,7 +150,7 @@ The packages containing configuration follow some special rules:
- They cannot contain ``requires`` to other packages
- The configuration packages are created with ``conan create`` and ``conan export-pkg`` as other packages, and uploaded to the servers with ``conan upload``

To install configuration from a Conan configuration package, it is possible:
To install a configuration from a Conan configuration package, it is possible:

- To generate a lockfile file with ``--lockfile-out``. This lockfile file can be passed to ``conan config install-pkg --lockfile`` (it will automatically loaded it if is named ``conan.lock`` and found in the current directory) in the future to guarantee the same exact version.
- Version ranges can be used ``conan config install-pkg "myconf/[>=1.0 <2]"`` is correct, and it will install the latest one in that range.
Expand Down Expand Up @@ -189,7 +195,7 @@ And if they had a layout with different ``global.conf`` for the different platfo
nix/global.conf


They, they could create and upload their configuration package as:
They could create and upload their configuration package as:

.. code-block:: bash

Expand Down
6 changes: 3 additions & 3 deletions reference/config_files/profiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ the prefix of the variable. It is useful to automatically get the append/prepend
MyPath1=+(path)/other path/path12

# Unset the variable "MyPath1"
MyPath1=!
mypkg/*:MyPath1=!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be introducing here the concept of per-package environment, but this section is to introduce the core syntax (add, append, remove).

It would be better to leave it as-is, and then add the per-package examples with mypkg/* separately

Copy link
Contributor Author

@perseoGI perseoGI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. There were two options, modifying this line or the below line.
See this screen capture from https://docs.conan.io/2/reference/config_files/profiles.html#profiles

I was confused about reading MyPath=! and then the explanation below.

Image

That is why I added that pattern, because if not, the Unix/Windows explanation below will be invalidated, as after parsing all the profile, MyPath1 will be empty.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that is wrong, indeed.
Lets try to improve it:

  • Use MyPath2=! in the text
  • Explain in the explanation that if the system had defined MyPath2, it will be unset by Conan
  • After this example explanation, add a small example with per-package environment, a simple MyVar1=value1 followed by mypkg/*:MyVar1=value2 and explaining the final values would be enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated:
image



Then, the result of applying this profile is:
Expand All @@ -295,7 +295,7 @@ Then, the result of applying this profile is:
* ``MyPath1``:
* Unix: ``/other path/path12:/some/path11``
* Windows: ``/other path/path12;/some/path11``
* ``mypkg*:PATH``: ``None``
* For the `mypkg` recipe the value will be unset

.. warning::

Expand Down Expand Up @@ -653,7 +653,7 @@ Some of the capabilities of the profile templates are:
.. code-block:: jinja
:caption: *profile_vars*

{% set version = subprocess.check_output(['clang++', "-dumpversion]).strip() %}
{% set version = subprocess.check_output(['clang++', "-dumpversion"]).strip() %}
[settings]
compiler.version={{ version }}

Expand Down
9 changes: 5 additions & 4 deletions reference/config_files/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ Here you can find a brief explanation of each of the architectures defined as ``
- **asm.js**: The subset of JavaScript that can be used as low-level target for compilers, not really a processor architecture, it's produced
by Emscripten. Conan treats it as an architecture to align with build systems design (e.g. GNU auto tools and CMake).
- **wasm**: The Web Assembly, not really a processor architecture, but byte-code format for Web, it's produced by Emscripten. Conan treats it
as an architecture to align with build systems design (e.g. GNU auto tools and CMake).
as an architecture to align with build systems design (e.g. GNU auto tools, CMake, etc).
- **wasm64**: The Web Assembly 64 bit, same as **wasm** but for 64 bit. Conan will add the necessary flags to the compiler to produce 64 bit Web Assembly code.
- **sh4le**: The Hitachi SH-4 SuperH architecture.
- **e2k-v2**: The Elbrus 2000 v2 512 bit VLIW (Very Long Instruction Word) architecture (Elbrus 2CM, Elbrus 2C+ CPUs) originally developed by MCST (Moscow Center of SPARC Technologies).
- **e2k-v3**: The Elbrus 2000 v3 512 bit VLIW (Very Long Instruction Word) architecture (Elbrus 2S, aka Elbrus 4C, CPU) originally developed by MCST (Moscow Center of SPARC Technologies).
Expand All @@ -172,17 +173,17 @@ C++ standard libraries (aka compiler.libcxx)
``compiler.libcxx`` sub-setting defines C++ standard libraries implementation to be used. The sub-setting applies only to certain compilers,
e.g. it applies to *clang*, *apple-clang* and *gcc*, but doesn't apply to *Visual Studio*.

- **libstdc++** (gcc, clang, apple-clang, sun-cc): `The GNU C++ Library <https://gcc.gnu.org/onlinedocs/libstdc++/>`__. NOTE that this implicitly
- **libstdc++** (gcc, clang, apple-clang, sun-cc, intel-cc, mcst-lcc, emcc): `The GNU C++ Library <https://gcc.gnu.org/onlinedocs/libstdc++/>`__. NOTE that this implicitly
defines **_GLIBCXX_USE_CXX11_ABI=0** to use old ABI. Might be a wise choice for old systems, such as CentOS 6. On Linux systems,
you may need to install `libstdc++-dev <https://packages.debian.org/sid/libstdc++-dev>`_ (package name could be different in various distros)
in order to use the standard library. NOTE that on Apple systems usage of **libstdc++** has been deprecated.

- **libstdc++11** (gcc, clang, apple-clang): `The GNU C++ Library <https://gcc.gnu.org/onlinedocs/libstdc++/>`__. NOTE that this implicitly
- **libstdc++11** (gcc, clang, intel-cc, mcst-lcc, emcc): `The GNU C++ Library <https://gcc.gnu.org/onlinedocs/libstdc++/>`__. NOTE that this implicitly
defines **_GLIBCXX_USE_CXX11_ABI=1** to use new ABI. Might be a wise choice for newer systems, such as Ubuntu 20. On Linux systems,
you may need to install `libstdc++-dev <https://packages.debian.org/sid/libstdc++-dev>`_ (package name could be different in various distros)
in order to use the standard library. NOTE that on Apple systems usage of **libstdc++** has been deprecated.

- **libc++** (clang, apple-clang): `LLVM libc++ <https://libcxx.llvm.org/>`__. On Linux systems, you may need to install `libc++-dev <https://packages.debian.org/sid/libc++-dev>`_
- **libc++** (clang, apple-clang, intel-cc, emcc): `LLVM libc++ <https://libcxx.llvm.org/>`__. On Linux systems, you may need to install `libc++-dev <https://packages.debian.org/sid/libc++-dev>`_
(package name could be different in various distros) in order to use the standard library.

- **c++_shared** (clang, Android only): use `LLVM libc++ <https://libcxx.llvm.org/>`__ as a shared library. Refer to the `C++ Library Support <https://developer.android.com/ndk/guides/cpp-support>`__ for the
Expand Down