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

select toolchain like cmake -t "v140"? #229

Closed
xtvjxk123456 opened this issue Oct 15, 2018 · 3 comments
Closed

select toolchain like cmake -t "v140"? #229

xtvjxk123456 opened this issue Oct 15, 2018 · 3 comments

Comments

@xtvjxk123456
Copy link

what about selecting toolchain like cmake -t flag?

@waruqi waruqi added this to the v2.2.3 milestone Oct 16, 2018
@waruqi
Copy link
Member

waruqi commented Oct 20, 2018

I have supported this feature, you can install and try it. https://github.com/tboox/xmake/releases/download/v2.2.2/xmake-v2.2.2.exe

$ xmake f --vs_toolset=14.0
$ xmake

@xtvjxk123456
Copy link
Author

xmake project do not generate a solution with right vs toolset

@waruqi
Copy link
Member

waruqi commented Oct 23, 2018

I have improved it, you can try it again. https://github.com/tboox/xmake/releases/download/v2.2.2/xmake-v2.2.3-dev.exe

$ xmake f --vs_toolset=14.1
$ xmake project -k vs2017

And It has support xp now.

target("test")
    set_kind("binary")
    add_files("src/*.c") 

    -- compatible with xp
    add_defines("_USING_V140_SDK71_")
    add_ldflags("/SUBSYSTEM:CONSOLE,5.01")

Then we run:

$ xmake f --vs_toolset=14.0
$ xmake project -k vs2017

It will generate vcproj file with toolset: v140_xp

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

No branches or pull requests

2 participants