From 557798ba801affe9a14d209f16e34ec236a4520f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 22 Oct 2025 12:11:49 +0200 Subject: [PATCH] Mention that setting item to None in compat is supported --- reference/binary_model/custom_compatibility.rst | 2 ++ reference/conanfile/methods/compatibility.rst | 3 ++- reference/extensions/binary_compatibility.rst | 12 +++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/reference/binary_model/custom_compatibility.rst b/reference/binary_model/custom_compatibility.rst index 4d00cc14ba49..d7126dec2044 100644 --- a/reference/binary_model/custom_compatibility.rst +++ b/reference/binary_model/custom_compatibility.rst @@ -1,3 +1,5 @@ +.. _reference_binary_model_custom_compatibility: + Customizing the binary compatibility ==================================== diff --git a/reference/conanfile/methods/compatibility.rst b/reference/conanfile/methods/compatibility.rst index 2d09aa6020db..d90e570c8fdf 100644 --- a/reference/conanfile/methods/compatibility.rst +++ b/reference/conanfile/methods/compatibility.rst @@ -48,4 +48,5 @@ The format of the list returned is as shown below: .. seealso:: - Read the :ref:`binary model reference` for a full view of the Conan binary model. + - Read the :ref:`binary model reference` for a full view of the Conan binary model. + - See more about :ref:`customizing the binary compatibility of your packages` diff --git a/reference/extensions/binary_compatibility.rst b/reference/extensions/binary_compatibility.rst index fecbcb8f486e..3cec1f3b15a7 100644 --- a/reference/extensions/binary_compatibility.rst +++ b/reference/extensions/binary_compatibility.rst @@ -23,7 +23,7 @@ The following would be valid syntax (but not an useful or working one, as it wil return result -Conan provides a default ``compatibility.py`` implementation that implements binary compatibility for +Conan provides a default ``compatibility.py`` that implements binary compatibility for different ``compiler.cppstd`` and ``compiler.cstd`` values. That is, by default it assumes that binaries built with different ``cppstd`` and ``cstd`` values (for the same compiler and compiler version) are binary compatible, and can be linked together without issues. @@ -38,11 +38,13 @@ recipe the ``extension_properties = {"compatibility_cppstd": False}`` attribute, From Conan 2.4, the ``compiler.cstd`` setting is available. It will only be taken into account in the computation of packages ``package_id`` when their recipes explicitly declare the ``languages = "C"`` attribute. -Some important rules: - -- The built-in ``compatibility.py`` is subject to changes in future releases. To avoid being updated - in the future, please remove the first comment ``# This file was generated by Conan.`` +There are some cases where the default ``compatibility.py`` will not be enough, and users will need to +customize it to their needs. Some rules and tips for that customization are explained below. +- Importantly, the built-in ``compatibility.py`` **is subject to changes in future releases**. + To avoid being updated in the future, please remove the first comment ``# This file was generated by Conan.`` +- Removing values from ``settings`` or ``options`` in the returned list is possible when they allow being unset, + by specifying the value of the item to ``None``. .. warning::