Skip to content

Commit df540d4

Browse files
authored
Mention that setting item to None in compat is supported (#4278)
1 parent 507b84c commit df540d4

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

reference/binary_model/custom_compatibility.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _reference_binary_model_custom_compatibility:
2+
13
Customizing the binary compatibility
24
====================================
35

reference/conanfile/methods/compatibility.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ The format of the list returned is as shown below:
4848
4949
.. seealso::
5050

51-
Read the :ref:`binary model reference<reference_binary_model>` for a full view of the Conan binary model.
51+
- Read the :ref:`binary model reference<reference_binary_model>` for a full view of the Conan binary model.
52+
- See more about :ref:`customizing the binary compatibility of your packages<reference_binary_model_custom_compatibility>`

reference/extensions/binary_compatibility.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The following would be valid syntax (but not an useful or working one, as it wil
2323
return result
2424
2525
26-
Conan provides a default ``compatibility.py`` implementation that implements binary compatibility for
26+
Conan provides a default ``compatibility.py`` that implements binary compatibility for
2727
different ``compiler.cppstd`` and ``compiler.cstd`` values. That is, by default it assumes that binaries built with different ``cppstd``
2828
and ``cstd`` values (for the same compiler and compiler version) are binary compatible, and can be linked together
2929
without issues.
@@ -38,11 +38,13 @@ recipe the ``extension_properties = {"compatibility_cppstd": False}`` attribute,
3838
From Conan 2.4, the ``compiler.cstd`` setting is available. It will only be taken into account in the computation of
3939
packages ``package_id`` when their recipes explicitly declare the ``languages = "C"`` attribute.
4040

41-
Some important rules:
42-
43-
- The built-in ``compatibility.py`` is subject to changes in future releases. To avoid being updated
44-
in the future, please remove the first comment ``# This file was generated by Conan.``
41+
There are some cases where the default ``compatibility.py`` will not be enough, and users will need to
42+
customize it to their needs. Some rules and tips for that customization are explained below.
4543

44+
- Importantly, the built-in ``compatibility.py`` **is subject to changes in future releases**.
45+
To avoid being updated in the future, please remove the first comment ``# This file was generated by Conan.``
46+
- Removing values from ``settings`` or ``options`` in the returned list is possible when they allow being unset,
47+
by specifying the value of the item to ``None``.
4648

4749
.. warning::
4850

0 commit comments

Comments
 (0)