You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conan1.0.rst
+21-30Lines changed: 21 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@
4
4
Upgrading to conan 1.0
5
5
======================
6
6
7
-
If you were using a 0.X conan version, there are some things to consider while upgrading. They are reflected in the :ref:`changelog<changelog>`., but this section summarizes the most important changes here:
7
+
This section summarizes the most important changes you need to consider when upgrading to Conan v1.0 from version 0.x. For a full list of changes and considerations, please refer to the :ref:`changelog<changelog>`.
8
8
9
9
10
10
Command line changes
11
11
--------------------
12
12
13
-
There has been a few things that will break existing usage (compared to 0.30). Most of them are in command line arguments, so they are relatively easy to fix. The most important one is that now most commands require the path to the conanfile folder or file, instead of using ``--path`` and ``--file`` arguments. Specifically, :command:`conan install`, :command:`conan export` and :command:`conan create` will be the ones most affected:
13
+
There are a few breaking changes (compared to v0.30), however, most of them are in command line arguments so they are quite easy to fix. The most significant change is that now, instead of using ``--path`` ``--file`` arguments, most commands now require the path to the conanfile folder or file. Specifically, :command:`conan install`, :command:`conan export` and :command:`conan create` will be the ones most affected:
14
14
15
15
.. code-block:: bash
16
16
@@ -26,11 +26,11 @@ There has been a few things that will break existing usage (compared to 0.30). M
This behavior aligns with the :command:`conan source`, :command:`conan build`, :command:`conan package` commands, that all use the same arguments to locate the *conanfile.py* containing the logic to be run.
29
+
This behavior aligns with the :command:`conan source`, :command:`conan build`, :command:`conan package` commands, that all use the same arguments to locate the *conanfile.py* file containing the logic to be run.
30
30
31
-
Now all commands read: :command:`command <origin-conanfile> ...`
31
+
Now, all commands read: :command:`command <origin-conanfile> ...`
32
32
33
-
Also, all arguments to command line now use dash instead of underscore:
33
+
In addition, all command line arguments now use a dash instead of an underscore:
34
34
35
35
.. code-block:: bash
36
36
@@ -40,21 +40,19 @@ Deprecations/removals
40
40
---------------------
41
41
42
42
- scopes were completely removed in conan 0.30.X
43
-
- ``self.conanfile_directory`` has been removed. Use ``self.source_folder``, ``self.build_folder``, etc. instead
44
-
- ``self.cpp_info``, ``self.env_info`` and ``self.user_info`` scope has been reduced to only the ``package_info()`` method
45
-
- ``gcc`` and ``ConfigureEnvironment`` were already removed in conan 0.30.1
46
-
- ``werror`` doesn't exist anymore. Now it is the builtin behavior.
47
-
- Command ``test_package`` has been removed. Use :command:`conan create` and :command:`conan test` instead.
48
-
- ``CMake`` helper only allows now (from conan 0.29). the ``CMake(self)`` syntax
49
-
- :command:`conan package_files` command was replaced in conan 0.28 by:command:`conan export-pkg` command.
43
+
- ``self.conanfile_directory`` has been removed. Instead, use ``self.source_folder``, ``self.build_folder``, etc.
44
+
- ``self.cpp_info``, ``self.env_info`` and ``self.user_info`` scope are now only included the ``package_info()`` method
45
+
- ``gcc`` and ``ConfigureEnvironment`` were removed in conan 0.30.1
46
+
- ``werror`` doesn't exist anymore. It is now built-in behavior.
47
+
- The ``test_package`` command has been removed. Instead, use :command:`conan create` and :command:`conan test`.
48
+
- From Conan v0.29, the``CMake`` helper only supports the ``CMake(self)`` syntax
49
+
- In Conan v0.28, the :command:`conan package_files` command was replaced by the:command:`conan export-pkg` command.
50
50
51
51
52
-
Settings and profiles. Gcc/CLang versioning
52
+
Settings and profiles. GCC/CLang versioning
53
53
-------------------------------------------
54
54
55
-
gcc and clang compilers have modified their versioning approach, from gcc > 5 and clang > 4,
56
-
the minors are really bugfixes, and then they have binary compatibility. To adapt to this,
57
-
conan now includes major version in the *settings.yml* default settings file:
55
+
The GCC and Clang compilers have modified their versioning approach. From GCC version 5 and above and Clang version 4 and above, minor versions are really bug fixes, and then, they have binary compatibility. To adapt to this, Conan now includes a major version in the *settings.yml* default settings file:
58
56
59
57
.. code-block:: yaml
60
58
@@ -67,33 +65,26 @@ conan now includes major version in the *settings.yml* default settings file:
67
65
Most package creators want to use the major-only settings, like ``-s compiler=gcc -s compiler.version=5``,
68
66
instead of specifying the minors too.
69
67
70
-
The default profile detection and creation has been modified accordingly, but if you have a default
71
-
profile you may want to update it to reflect this:
68
+
The default profile detection and creation has been modified accordingly, however, if you have a default profile you may want to update it to reflect this:
72
69
73
-
.. code-block::text
70
+
.. code-block::text
74
71
75
72
[settings]
76
73
os=Linux
77
74
compiler=gcc
78
75
compiler.version=7 #instead of 7.2
79
76
80
-
81
-
Conan associated tools (conan-package-tools, conan.cmake) have been upgraded to accomodate this new defaults.
82
-
83
-
84
-
85
-
77
+
Conan associated tools (conan-package-tools, conan.cmake) have been upgraded to accomodate these new defaults.
86
78
87
79
New features
88
80
------------
89
81
90
-
- Cross-compilation support with new default settings in settings.yml: ``os_build``, ``arch_build``, ``os_target``, ``arch_target``.
91
-
They are automatically removed from the ``package_id`` computation, or kept if they
92
-
are the only ones defined (as it happens usually with dev-tools packages). It is possible to keep them too with the ``self.info.include_build_settings()`` method (call it in your ``package_id()`` method).
82
+
- Cross-compilation support with new default settings in *settings.yml*: ``os_build``, ``arch_build``, ``os_target``, ``arch_target``.
83
+
These are automatically removed from the ``package_id`` computation, or kept if they are the only ones defined (as usually happens with dev-tools packages). You can also keep them with the ``self.info.include_build_settings()`` method (call it in your ``package_id()`` method).
93
84
94
85
.. important::
95
86
96
-
Please **don't** use cross-build settings ``os_build``, ``arch_build`` for standard packages and libraries.
87
+
**Do not** use cross-build settings ``os_build`` and ``arch_build`` for standard packages and libraries.
97
88
They are only useful for packages that are used via ``build_requires``, like ``cmake_installer`` or ``mingw_installer``.
98
89
99
90
@@ -105,7 +96,7 @@ New features
105
96
Windows:
106
97
subsystem: [None, cygwin, msys, msys2, wsl]
107
98
108
-
This subsetting can be used by build helpers as ``CMake``, to act accordingly.
99
+
This subsetting can be used by build helpers such as ``CMake`` to act accordingly.
0 commit comments