Skip to content

Commit

Permalink
options patterns (#3720)
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded authored May 16, 2024
1 parent 92e81a3 commit 3e4cac1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion reference/commands/graph/explain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In the same way, it can report when a package has a different option value and t

.. code-block:: text
$conan graph explain --requires=lib/1.0.0 -o shared=True --format=json
$conan graph explain --requires=lib/1.0.0 -o lib/*:shared=True --format=json
...
{
"closest_binaries": {
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 @@ -20,7 +20,7 @@ They have this structure:
os=Macos
[options]
MyLib:shared=True
mylib/*:shared=True
[tool_requires]
tool1/0.1@user/channel
Expand Down Expand Up @@ -204,8 +204,8 @@ List of options available from your recipe and its dependencies:
:caption: *myprofile*
[options]
my_pkg_option=True
shared=True
mypkg/*:my_pkg_option=True
*:shared=True
.. _reference_config_files_profiles_tool_requires:
Expand Down
12 changes: 11 additions & 1 deletion tutorial/consuming_packages/different_configurations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,17 @@ using the ``--options`` argument. To do so, please run:
Doing this, Conan will install the *Zlib* shared libraries, generate the files to build with
them and, also the necessary files to locate those dynamic libraries when running the
application. Let's build the application again after configuring it to link *Zlib* as a
application.

.. note::

Options are defined per-package. In this case we were defining that we wanted that specific
version of zlib/1.2.11 as a shared library. If we had other dependencies and we want all of
our dependencies (whenever possible) as shared libraries, we would use ``-o *:shared=True``,
with the ``*`` pattern that matches all package references.


Let's build the application again after configuring it to link *Zlib* as a
shared library:

.. code-block:: bash
Expand Down

0 comments on commit 3e4cac1

Please sign in to comment.