-
Notifications
You must be signed in to change notification settings - Fork 380
Description
Just to clarify some Conan behavior:
The declaration of
settingsis not intended to be a setup, configuration or activation of the compiler for all cases, but a declaration of the "binary compatibility" of the packages.In some cases, the settings information can be enough, like when using CMake, for selecting the right compiler (like when CMake uses a Visual Studio generator). In these cases it is not Conan automatically configuring the environment, but CMake. But for other cases, specially those that are not the default of the platform, no automatic setup is done by Conan.
The
tools.build:compiler_executablesis defined because it can be a more general approach than using CC/CXX environment variables, because there are build systems that do not listen to these env-vars at all.Conan can use different settings for different packages in the dependency graph, like
-s mypgk1*:compiler.version=11 -s mypkg2*:compiler.version=12if we wanted to build these packages with different compiler versions. This can be configured in profile[buildenv]with per-package environment variables or using[conf]tools.build:compiler_executables, that can also be configured per-package.Wow. This needs to be put as-is into the docs. Maybe somewhere at the begining of https://docs.conan.io/2/reference/config_files/profiles.html?
If it is already in the docs, I haven't found it. Only after reading this comment, it finally "clicked" for me.
Originally posted by @zbynekwinkler in #14870