-
-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMAKE_GENERATOR_TOOLSET is set to v144, which doesn't exist yet #4772
Comments
It should just be that the current cmake version doesn't support the latest vs preview version and v144, it doesn't seem to have anything to do with xmake. We shouldn't have to hardcode changes to _get_vs_toolset, and there's no other way to work around it, since it's not a bug and you can wait for cmake to support it. |
It shouldn't be hardcoded, but v144 doesn't exist. The latest toolset is v143, but the code that parses the version number doesn't work for this version.. |
but we get v144 from vs/vcvarsall.bat. we cannot modify it. you can run |
You are using the Visual Studio preview which includes the MSVC preview (v144). Cmake doesn't support the Visual Studio preview, so it won't recognise the compiler. |
So I think this should be a cmake issue, and you can wait for cmake to support it instead of modifying the version in tools/cmake.lua |
I don't know which version of cmake supports v144, I can only assume at this point that it's not supported in any version prior to 3.29.0 and let it using v143 |
thanks |
try |
Xmake Version
v2.8.7+HEAD.da279272a
Operating System Version and Architecture
Windows 11 10.0.22631.3155
Describe Bug
I found that
_get_vs_toolset
inmodules/package/tools/cmake.lua
is responsible, and its parsing of the version doesn't work correctly with Visual Studio 2022 Preview. I modified it to return v143 if it gets v144, but this is obviously a very temporary fix.Expected Behavior
It should properly understand what toolset to use. I'm not exactly sure how you would fix this, and it's possible Microsoft will make a v144 toolset in the near future, but until then this code doesn't work properly. It's also worth mentioning that passing
--vs_toolset
toxmake config
doesn't impact what the CMake command uses, which is probably also worth looking into, and it would be a less fragile but less convenient fix to this issue.Project Configuration
This isn't really relevant, the issue seems to be caused by using a preview version of Visual Studio 2022
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: