From c28a07e3406e4541fbe63d80c714592e2d434b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Thu, 10 Jul 2025 12:26:17 +0200 Subject: [PATCH 1/2] Add explanation for platform_tool_requires context --- reference/config_files/profiles.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reference/config_files/profiles.rst b/reference/config_files/profiles.rst index a029fc3401a1..f090c643f4f3 100644 --- a/reference/config_files/profiles.rst +++ b/reference/config_files/profiles.rst @@ -540,9 +540,12 @@ declaration: Build requirements cmake/3.24.2 - Platform -Note that if the ``platform_tool_requires`` declared **does not make a strict match** with the ``tool_requires`` one (version or -version range), then Conan will try to bring them remotely or locally as usual. - +.. note:: + * If the ``platform_tool_requires`` declared **does not make a strict match** with the ``tool_requires`` one (version or + version range), then Conan will try to bring them remotely or locally as usual. + * This section should be added to the profile whose context is the one that requires the tool, i.e., if the + tool is required in the host context, then it should be added to the host profile, so that the requirement + itself can be replaced by the platform one. .. _reference_config_files_profiles_rendering: From 065b46cbadd9b398af9bfb20154d0fed39a0d1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Thu, 10 Jul 2025 20:11:11 +0200 Subject: [PATCH 2/2] Add same warning to replace_tool_requires --- reference/config_files/profiles.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reference/config_files/profiles.rst b/reference/config_files/profiles.rst index f090c643f4f3..937c34abd01d 100644 --- a/reference/config_files/profiles.rst +++ b/reference/config_files/profiles.rst @@ -445,6 +445,12 @@ Same usage as the `replace_requires` section but in this case for `tool_requires In this case, whatever version of ``cmake`` declared in recipes, will be replaced by the reference `cmake/3.25.2`. +.. note:: + + * This section should be added to the profile whose context is the one that requires the tool, i.e., if the + tool is required in the host context, then it should be added to the host profile, so that the requirement + itself can be replaced. + .. _reference_config_files_profiles_platform_requires: @@ -541,6 +547,7 @@ declaration: cmake/3.24.2 - Platform .. note:: + * If the ``platform_tool_requires`` declared **does not make a strict match** with the ``tool_requires`` one (version or version range), then Conan will try to bring them remotely or locally as usual. * This section should be added to the profile whose context is the one that requires the tool, i.e., if the