Skip to content
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

fixbug: config 'vs_sdkver' has no effect when generate vs project #5388

Closed
wants to merge 1 commit into from

Conversation

jinke18
Copy link
Contributor

@jinke18 jinke18 commented Jul 24, 2024

config vs_sdkver

xmake f --vs_sdkver=14.0

but it has no effect when generate a vs project

xmake project -k vs2015

this pull request fix this bug~

@waruqi
Copy link
Member

waruqi commented Jul 24, 2024

We shouldn't have modified it that way. First of all, 14.0 should be vs_toolset not vs_sdkver.

and

xmake f --vs_toolset/vs_sdkver -> msvc toolchain/check -> find_vstudio.lua -> get real toolset/sdkver -> generator/xmake build

so we should debug and check find_vstudio.lua

local vstudio = find_vstudio({vcvars_ver = vs_toolset, sdkver = vs_sdkver})

file:print("call \"%s\" -host_arch=%s -arch=%s -winsdk=%s -vcvars_ver=%s > nul", vcvarsall, host_arch, arch, opt.sdkver and opt.sdkver or "", opt.vcvars_ver)

@jinke18
Copy link
Contributor Author

jinke18 commented Jul 24, 2024

I'm sorry I made a mistake when submitting the pull request message.

it should be
config vs_sdkver

xmake f --vs_sdkver=8.1

@waruqi
Copy link
Member

waruqi commented Jul 24, 2024

you still need debug find_vstudio.lua, if it works, vcvars.WindowsSDKVersion will be changed to your configs after running xmake f --vs_sdkver=xxx

@waruqi
Copy link
Member

waruqi commented Jul 29, 2024

You can open an issue for this patch. I will look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants