xmake icon indicating copy to clipboard operation
xmake copied to clipboard

Pass corrent msvc toolchain verison to conan.

Open thegoodtgg opened this issue 6 months ago • 1 comments

你在什么场景下需要该功能?

xmake seems could not generate valid profile for conan when using msvc toolset in some situation. I am using Visual Studio 17.4.2, and I have msvc toolset 14.42, 14.43, 14.44(which is latest) installed. I config my xmake project with "--vs_toolset=14.42" option, however when install conan package, it does not use 14.42 toolset. After some digging, I find out https://github.com/xmake-io/xmake/blob/dev/xmake/modules/package/manager/conan/v2/install_package.lua this file does not generate "compiler.update" for conan profile, as conan doc https://docs.conan.io/2/reference/config_files/settings.html#msvc saied.

描述可能的解决方案

Pass vs_toolset from config option to conan plugin and generate compiler.update for profile.

描述你认为的候选方案

No response

其他信息

No response

thegoodtgg avatar Aug 24 '25 10:08 thegoodtgg

you can pass conan settings in add_requires.

https://xmake.io/guide/package-management/using-third-party-packages.html#using-conan-dependency-package

add_requires("conan::poco/1.10.0", {alias = "poco",
    configs = {settings = {"compiler.toolset=v141_xp"}}})

waruqi avatar Aug 25 '25 00:08 waruqi