Skip to content

Commit 1141318

Browse files
authored
Merge pull request #2089 from conan-io/release/1.36.0
Release/1.36.0
2 parents b474c4d + dd4fa7e commit 1141318

File tree

20 files changed

+380
-297
lines changed

20 files changed

+380
-297
lines changed

.ci/publish.jenkins

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// TODO: Move to a file and avoid modifying CI script
44
Map<String, String> versions = [
5+
'release/1.36.0': '1.36',
56
'release/1.35.2': '1.35',
67
'release/1.34.1': '1.34',
78
'release/1.33.1': '1.33',

changelog.rst

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,40 @@ Check https://github.com/conan-io/conan for issues and more details about develo
1818

1919
.. important::
2020

21-
Conan 1.35 shouldn't break any existing 1.0 recipe or command line invocation. If it does, please
21+
Conan 1.36 shouldn't break any existing 1.0 recipe or command line invocation. If it does, please
2222
submit a report on GitHub. Read more about the :ref:`Conan stability commitment<stability>`.
2323

24+
1.36.0 (28-Apr-2021)
25+
--------------------
26+
27+
- Feature: Add support to ``tools.cmake.CMake`` for Ninja toolchain defined with ``CMakeToolchain``. `#8887 <https://github.com/conan-io/conan/pull/8887>`_
28+
- Feature: The `CMakeDeps` generator will print CMake traces with the declared targets. e.g: `Target declared: 'OpenSSL::Crypto'`. `#8843 <https://github.com/conan-io/conan/pull/8843>`_
29+
- Feature: Add clang 12 support. `#8828 <https://github.com/conan-io/conan/pull/8828>`_
30+
- Feature: List tools and core from profile and _global.conf_. `#8821 <https://github.com/conan-io/conan/pull/8821>`_ . Docs `here <https://github.com/conan-io/docs/pull/2077>`__
31+
- Feature: Add cross-building tests for new AutoTools build helper. `#8819 <https://github.com/conan-io/conan/pull/8819>`_
32+
- Feature: ``CMakeToolchain`` generates a ``conanbuild.json`` file with the generator to be used in the ``CMake`` command line later, so it is not necessary to duplicate logic, and is explicit what generator should be used. `#8815 <https://github.com/conan-io/conan/pull/8815>`_ . Docs `here <https://github.com/conan-io/docs/pull/2079>`__
33+
- Feature: ``CMakeToolchain`` learned to build with different toolsets, down to the minor compiler version, for the ``msvc`` compiler. `#8815 <https://github.com/conan-io/conan/pull/8815>`_ . Docs `here <https://github.com/conan-io/docs/pull/2079>`__
34+
- Feature: Validate checksum and retry download for corrupted downloaded cache files. `#8806 <https://github.com/conan-io/conan/pull/8806>`_
35+
- Feature: ``CMakeToolchain`` defining `CMAKE_GENERATOR_TOOLSET` for msvc version different than the default. `#8800 <https://github.com/conan-io/conan/pull/8800>`_
36+
- Feature: Implement ``test_build_require`` in ``test_package/conanfile.py`` recipes, so build_requires can be tested as such. `#8787 <https://github.com/conan-io/conan/pull/8787>`_ . Docs `here <https://github.com/conan-io/docs/pull/2081>`__
37+
- Feature: Make available the full recipe and package reference to consumers via ``.dependencies``. `#8765 <https://github.com/conan-io/conan/pull/8765>`_
38+
- Feature: New ``CMakeToolchain`` customization and extensibility mechanism with blocks of components instead of inheritance. `#8749 <https://github.com/conan-io/conan/pull/8749>`_ . Docs `here <https://github.com/conan-io/docs/pull/2085>`__
39+
- Feature: Add `set_property` and `get_property` to set properties and access them in generators. Can be set only for a specific generator or as a default value for all of them. `#8727 <https://github.com/conan-io/conan/pull/8727>`_ . Docs `here <https://github.com/conan-io/docs/pull/2082>`__
40+
- Feature: Use `set_property` and `get_property` to support custom defined content in `pkg_config` generator. `#8727 <https://github.com/conan-io/conan/pull/8727>`_ . Docs `here <https://github.com/conan-io/docs/pull/2082>`__
41+
- Feature: Add new property names: `cmake_target_name`, `cmake_file_name`, `pkg_config_name` and `cmake_build_modules` that can be used for multiple generators of the same type allowing also an easier migration of `names`, `filenames` and `build_modules` properties to this model. `#8727 <https://github.com/conan-io/conan/pull/8727>`_ . Docs `here <https://github.com/conan-io/docs/pull/2082>`__
42+
- Feature: Skip package when building all package from sources at once using `--build=!<package>` syntax. `#8483 <https://github.com/conan-io/conan/pull/8483>`_ . Docs `here <https://github.com/conan-io/docs/pull/2023>`__
43+
- Feature: ``CMakeToolchain`` will generate ``conanvcvars.bat`` for Ninja builds for ``msvc``. `#8005 <https://github.com/conan-io/conan/pull/8005>`_
44+
- Fix: Remove ``tools.gnu.MakeToolchain``, superseded by ``tools.gnu.AutotoolsToolchain``. `#8880 <https://github.com/conan-io/conan/pull/8880>`_ . Docs `here <https://github.com/conan-io/docs/pull/2084>`__
45+
- Fix: Allow spaces in the path for new environment files and ``conancvvars.bat`` Visual toolchain file. `#8847 <https://github.com/conan-io/conan/pull/8847>`_
46+
- Fix: Return `deprecated` attribute in :command:`conan inspect` command. `#8832 <https://github.com/conan-io/conan/pull/8832>`_
47+
- Fix: Check if Artifactory url for publishing the build_info has `artifactory` string as the service context and remove from the API url if it doesn't. `#8826 <https://github.com/conan-io/conan/pull/8826>`_
48+
- Fix: Recognize ``Ninja Multi-Config`` as a CMake multi-configuration generator. `#8814 <https://github.com/conan-io/conan/pull/8814>`_
49+
- Fix: using `CMAKE_CURRENT_LIST_DIR` in `CMakeToolchain` to locate `CMakeDeps` config files. `#8810 <https://github.com/conan-io/conan/pull/8810>`_
50+
- Fix: `config_install_interval` no longer enter in loop when invalid. `#8769 <https://github.com/conan-io/conan/pull/8769>`_ . Docs `here <https://github.com/conan-io/docs/pull/2067>`__
51+
- Fix: Remove multi-config support for ``CMakeDeps`` generator. `#8767 <https://github.com/conan-io/conan/pull/8767>`_ . Docs `here <https://github.com/conan-io/docs/pull/2083>`__
52+
- Fix: Accept relative profile path when folder is on same tree level. `#8685 <https://github.com/conan-io/conan/pull/8685>`_ . Docs `here <https://github.com/conan-io/docs/pull/2049>`__
53+
- Bugfix: Fixed test_package/conanfile.py using ``build_requires`` for a package belonging to a lockfile. `#8793 <https://github.com/conan-io/conan/pull/8793>`_
54+
2455
1.35.2 (19-Apr-2021)
2556
--------------------
2657

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
]
4242

4343
# The short X.Y version.
44-
version = "1.35"
44+
version = "1.36"
4545
# The full version, including alpha/beta/rc tags.
46-
release = u'1.35.2'
46+
release = u'1.36.0'
4747

4848
dir_path = os.path.dirname(os.path.realpath(__file__))
4949
if not os.path.exists(os.path.join(dir_path, "versions.json")):

creating_packages/package_approaches.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ Read more about this in :ref:`method_package_info`.
7979
N configs -> 1 package
8080
----------------------
8181

82+
.. warning::
83+
84+
This approach is discouraged. The support for defining multi-configuration packages (``self.cpp_info.release``, ``self.cpp_info.debug``),
85+
will be removed in Conan 2.0, as discussed and approved by the Tribe in https://github.com/conan-io/tribe/pull/21. New generators and
86+
helpers in ``conan.tools.xxxx``, like ``CMakeDeps`` or ``MSBuildDeps`` already ignore ``cpp_info`` multi-configuration definitions.
87+
88+
8289
You may want to package both debug and release artifacts in the same package, so it can be consumed from IDEs like Visual Studio. This will
8390
change the debug/release configuration from the IDE, without having to specify it in the command line. This type of package can contain
8491
different artifacts for different configurations and can be used to include both the release and debug version of a library in the same

creating_packages/toolchains.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ For example, for using the CMake toolchain this should be declared in the recipe
4040
4141
.. note::
4242

43-
At the moment (Conan 1.32), the available built-in toolchains are ``CMakeToolchain``, ``MakeToolchain``,
43+
At the moment (Conan 1.32), the available built-in toolchains are ``CMakeToolchain``,
4444
``MSBuildToolchain`` and ``MesonToolchain``.
4545

4646
But in the more general case, and if it needs any specific configuration beyond the default

devtools/build_requires.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,32 @@ same ``build_requires`` package. Something like:
268268
By using this mechanism, ``tool`` dependency will always be used (the recipe will be fetched from servers), and the version of ``tool`` will
269269
be used to compute the ``package_id`` following the ``default_python_requires_id_mode`` in *conan.conf*, or the specific
270270
``self.info.python_requires.xxxx_mode()`` in recipes.
271+
272+
273+
Testing build_requires
274+
----------------------
275+
276+
.. warning::
277+
278+
This is an **experimental** feature, subject to future breaking changes
279+
280+
Available since: `1.36.0 <https://github.com/conan-io/conan/releases>`_
281+
282+
From Conan 1.36, it is possible to test ``build_requires`` with the ``test_package`` functionality.
283+
What is necessary is to specify in the ``test_package/conanfile.py``, that the tested package
284+
is a build tool, which can be done with:
285+
286+
.. code-block:: python
287+
288+
from conans import ConanFile
289+
290+
class Pkg(ConanFile):
291+
test_type = "build_requires"
292+
293+
...
294+
295+
The rest of the test *conanfile.py* should take into account that the reference automatically injected
296+
will be a ``build_require``.
297+
298+
If for some reason, it is necessary to test the same package both as a regular require and a build_require,
299+
then it is possible to specify: ``test_type = "build_requires", "requires"``.

integrations/build_system/make.rst

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,16 @@
33
Make
44
====
55

6-
Conan provides two integrations for plain Makefiles:
6+
.. warning::
77

8-
| The :ref:`Make generator<make_generator>`
9-
| The :ref:`Make toolchain<make_toolchain>` (experimental)
8+
This integration is to be deprecated in Conan 2.0. Check :ref:`the conan.tools.gnu Autotools<conan_tools_gnu>` integration.
109

11-
Refer to the links above for more detail about each of them. Here we provide a
12-
high-level explanation of how these integrations are meant to be used.
13-
14-
If you are using ``Makefile`` to build your project you can use one or both of
15-
these depending on your needs.
10+
Conan provides the :ref:`Make generator<make_generator>` to integrate with plain Makefiles
1611

1712
The ``make`` generator outputs all the variables related to package dependencies
1813
into a file which is named *conanbuildinfo.mak*. The ``make`` toolchain outputs
1914
all the variables related to settings, options, and platform into a file which
20-
is named ``conan_toolchain.mak``.
15+
is named ``conan_toolchain.mak``.
2116

2217
To use the generator, indicate it in your ``conanfile`` like this:
2318

@@ -34,19 +29,6 @@ To use the generator, indicate it in your ``conanfile`` like this:
3429
...
3530
generators = "make"
3631
37-
To use the toolchain, add the following function to your ``conanfile``:
38-
39-
.. code-block:: python
40-
:caption: *conanfile.py*
41-
42-
class MyConan(ConanFile):
43-
...
44-
def generate(self):
45-
tc = Make(self)
46-
tc.generate()
47-
48-
**NOTE**: This can only be used in a ``conanfile.py`` and not ``conanfile.txt``.
49-
5032
5133
Example
5234
-------
@@ -74,33 +56,6 @@ This is the main source file for it:
7456
return 0;
7557
}
7658
77-
As this project relies on the Poco Libraries we are going to create a ``conanfile.py`` with our requirement and also declare the Make
78-
generator and Make toolchain. For simplicity, this ``conanfile`` declares an
79-
empty build and package step. They're not needed for for the local developer
80-
workflow.
81-
82-
.. code-block:: python
83-
:caption: *conanfile.py*
84-
85-
from conans import ConanFile
86-
from conan.tools.gnu import MakeToolchain
87-
88-
class MyConan(ConanFile):
89-
name = "myconan"
90-
version = "0.1"
91-
settings = "os", "arch", "compiler", "build_type"
92-
generators = "make"
93-
exports_sources = "*"
94-
95-
def generate(self):
96-
tc = MakeToolchain(self)
97-
tc.generate()
98-
99-
def build(self):
100-
pass
101-
102-
def package(self):
103-
pass
10459
10560
In order to use this generator within your project, use the following Makefile as a reference:
10661

@@ -114,13 +69,6 @@ In order to use this generator within your project, use the following Makefile a
11469
include conanbuildinfo.mak
11570
$(call CONAN_BASIC_SETUP)
11671
117-
#----------------------------------------
118-
# Prepare flags from make toolchain
119-
#----------------------------------------
120-
121-
include conan_toolchain.mak
122-
$(call CONAN_TC_SETUP)
123-
12472
#----------------------------------------
12573
# Make variables for a sample App
12674
#----------------------------------------
@@ -161,5 +109,3 @@ Now you can run your application with ``./main``.
161109
.. seealso::
162110

163111
| Complete reference for :ref:`Make generator<make_generator>`
164-
| Complete reference for :ref:`Make toolchain<make_toolchain>` (experimental)
165-

mastering/policies.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ As previously demonstrated, we can use the :command:`--build` option to change t
1313
- :command:`--build cascade` will build from code all the nodes with some dependency being built (for any reason). Can be used together with any
1414
other build policy. Useful to make sure that any new change introduced in a dependency is incorporated by building again the package.
1515
- :command:`--build pattern*` will build only the packages with the reference starting with "pattern".
16+
- :command:`--build --build=!some_package` will build all requirements from sources, except for some_package.
1617

1718

1819
With the ``build_policy`` attribute in the `conanfile.py` the package creator can change the default Conan's build behavior. The allowed build_policy values are:

reference/commands/consumer/config.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ conan config
1010

1111
.. code-block:: bash
1212
13-
$ conan config [-h] {get,home,install,rm,set,init} ...
13+
$ conan config [-h] {get,home,install,rm,set,init,list} ...
1414
1515
Manages Conan configuration.
1616

@@ -19,7 +19,7 @@ Used to edit conan.conf, or install config files.
1919
.. code-block:: text
2020
2121
positional arguments:
22-
{get,home,install,rm,set,init}
22+
{get,home,install,rm,set,init,list}
2323
sub-command help
2424
get Get the value of configuration item
2525
home Retrieve the Conan home directory
@@ -28,6 +28,7 @@ Used to edit conan.conf, or install config files.
2828
rm Remove an existing config element
2929
set Set a value for a configuration item
3030
init Initializes Conan configuration files
31+
list List Conan configuration properties
3132
3233
optional arguments:
3334
-h, --help show this help message and exit
@@ -67,6 +68,18 @@ Used to edit conan.conf, or install config files.
6768
6869
$ conan config init --force
6970
71+
- List all possible properties allowed for :ref:`global.conf<global_conf>`
72+
73+
.. code-block:: bash
74+
75+
$ conan config list
76+
77+
- Set config install scheduler for every 1 week:
78+
79+
.. code-block:: bash
80+
81+
$ conan config set general.config_install_interval=1w
82+
7083
.. _conan_config_install:
7184

7285
conan config install
@@ -204,7 +217,7 @@ Conan runs it based on *config_install.json*, including the timestamp of the las
204217
.. code-block:: bash
205218
206219
$ conan config install my_settings\settings.yml
207-
220+
208221
- Install the configuration from a local path:
209222
210223
.. code-block:: bash

reference/commands/consumer/install.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ generators.
8181
built from source. --build=[pattern] Build packages
8282
from source whose package reference matches the
8383
pattern. The pattern uses 'fnmatch' style wildcards.
84-
Default behavior: If you omit the '--build' option,
85-
the 'build_policy' attribute in conanfile.py will be
86-
used if it exists, otherwise the behavior is like '--
87-
build=never'.
84+
--build=![pattern] Excluded packages, which will not
85+
be built from the source, whose package reference
86+
matches the pattern. The pattern uses 'fnmatch' style
87+
wildcards. Default behavior: If you omit the '--build'
88+
option, the 'build_policy' attribute in conanfile.py
89+
will be used if it exists, otherwise the behavior is
90+
like '--build=never'.
8891
-r REMOTE, --remote REMOTE
8992
Look in the specified remote server
9093
-u, --update Will check the remote and in case a newer version
@@ -244,6 +247,13 @@ Possible values are:
244247
- e.g., :command:`--build=zlib` will match any package named ``zlib`` (same as ``zlib/*``).
245248
- e.g., :command:`--build=z*@conan/stable` will match any package starting with ``z`` with ``conan/stable`` as user/channel.
246249
250+
* :command:`--build=![pattern]`: A fnmatch case-sensitive pattern of a package reference or only the package name.
251+
Conan will exclude the build of the packages whose reference matches the given
252+
**pattern**. Several patterns can be specified, chaining multiple options:
253+
254+
- e.g., :command:`--build=!zlib --build` Build all packages from source, except for zlib.
255+
- e.g., :command:`--build=!z* --build` Build all packages from source, except for those starting with ``z``
256+
247257
If you omit the :command:`--build` option, the ``build_policy`` attribute in `conanfile.py` will be
248258
looked up. If it is set to ``missing`` or ``always``, this build option will be used, otherwise the
249259
command will behave like :command:`--build=never` was set.

0 commit comments

Comments
 (0)