Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions tutorial/consuming_packages/build_simple_cmake_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Now we are ready to build and run our **compressor** app:
$ Release\compressor.exe
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1

.. code-block:: bash
:caption: Linux, macOS
Expand All @@ -261,7 +261,7 @@ Now we are ready to build and run our **compressor** app:
$ ./compressor
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1


Note that ``CMakeToolchain`` might generate CMake **preset** files, that allows users with a modern CMake (``>=3.23``) to
Expand Down
4 changes: 2 additions & 2 deletions tutorial/consuming_packages/different_configurations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ built in *Debug* configuration:
$ Debug\compressor.exe
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
Debug configuration!

.. code-block:: bash
Expand All @@ -151,7 +151,7 @@ built in *Debug* configuration:
$ ./compressor
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
Debug configuration!


Expand Down
20 changes: 10 additions & 10 deletions tutorial/consuming_packages/the_flexibility_of_conanfile_py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ same results as before.
$ cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
$ cmake --build . --config Release
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor

$ Release\compressor.exe
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
$ deactivate_conanbuild.bat

.. code-block:: bash
Expand All @@ -148,14 +148,14 @@ same results as before.
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
$ cmake --build .
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor

$ ./compressor
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
$ source deactivate_conanbuild.sh

So far, we have achieved the same functionality we had using a *conanfile.txt*. Let's see
Expand Down Expand Up @@ -234,14 +234,14 @@ Check that running the same commands as in the previous examples without the
$ cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=generators\conan_toolchain.cmake
$ cmake --build . --config Release
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor

$ Release\compressor.exe
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
$ generators\deactivate_conanbuild.bat

.. code-block:: bash
Expand All @@ -255,14 +255,14 @@ Check that running the same commands as in the previous examples without the
$ cmake ../.. -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
$ cmake --build .
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor

$ ./compressor
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1
$ source ./generators/deactivate_conanbuild.sh

There's no need to always write this logic in the `conanfile.py`. There are some
Expand Down Expand Up @@ -431,9 +431,9 @@ So now we can just call ``conan build .``:
Graph root
conanfile.py: ...\conanfile.py
Requirements
zlib/1.2.11#bfceb3f8904b735f75c2b0df5713b1e6 - Downloaded (conancenter)
zlib/1.3.1#bfceb3f8904b735f75c2b0df5713b1e6 - Downloaded (conancenter)
Build requirements
cmake/3.22.6#32cced101c6df0fab43e8d00bd2483eb - Downloaded (conancenter)
cmake/3.27.9#32cced101c6df0fab43e8d00bd2483eb - Downloaded (conancenter)

======== Calling build() ========
conanfile.py: Calling build()
Expand Down
20 changes: 10 additions & 10 deletions tutorial/consuming_packages/use_tools_as_conan_packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The structure of the project is the same as the one of the previous example:

The main difference is the addition of the :ref:`reference_config_files_profiles_tool_requires` section in the
**conanfile.txt** file. In this section, we declare that we want to build our application
using CMake **v3.22.6**.
using CMake **v3.27.9**.

.. code-block:: ini
:caption: **conanfile.txt**
Expand Down Expand Up @@ -80,7 +80,7 @@ We also added a message to the *CMakeLists.txt* to output the CMake version:
target_link_libraries(${PROJECT_NAME} ZLIB::ZLIB)

Now, as in the previous example, we will use Conan to install **Zlib** and **CMake
3.22.6** and generate the files to find both of them. We will generate those
3.27.9** and generate the files to find both of them. We will generate those
files in the folder *build*. To do that, just run:

.. code-block:: bash
Expand Down Expand Up @@ -143,7 +143,7 @@ Now, if you check the folder you will see that Conan generated a new
file called ``conanbuild.sh/bat``. This is the result of automatically invoking a
``VirtualBuildEnv`` generator when we declared the ``tool_requires`` in the
**conanfile.txt**. This file sets some environment variables like a new ``PATH`` that
we can use to inject the location of CMake v3.22.6 into our environment.
we can use to inject the location of CMake v3.27.9 into our environment.

Activate the virtual environment, and run ``cmake --version`` to check that you
have installed the new CMake version in the path.
Expand All @@ -168,12 +168,12 @@ Run ``cmake`` and check the version:
.. code-block:: bash

$ cmake --version
cmake version 3.22.6
cmake version 3.27.9
...

As you can see, after activating the environment, the CMake v3.22.6 binary folder was
As you can see, after activating the environment, the CMake v3.27.9 binary folder was
added to the path and is the currently active version now. Now you can build your project as
you previously did, but this time Conan will use CMake 3.22.6 to build it:
you previously did, but this time Conan will use CMake 3.27.9 to build it:

.. code-block:: bash
:caption: Windows
Expand All @@ -182,27 +182,27 @@ you previously did, but this time Conan will use CMake 3.22.6 to build it:
$ cmake .. -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
$ cmake --build . --config Release
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor
$ Release\compressor.exe
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1

.. code-block:: bash
:caption: Linux, macOS

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
$ cmake --build .
...
Building with CMake version: 3.22.6
Building with CMake version: 3.27.9
...
[100%] Built target compressor
$ ./compressor
Uncompressed size is: 233
Compressed size is: 147
ZLIB VERSION: 1.2.11
ZLIB VERSION: 1.3.1


Note that when we activated the environment, a new file named
Expand Down