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

Support to build the selected files for the given target #487

Closed
waruqi opened this issue Jul 16, 2019 · 20 comments
Closed

Support to build the selected files for the given target #487

waruqi opened this issue Jul 16, 2019 · 20 comments

Comments

@waruqi
Copy link
Member

waruqi commented Jul 16, 2019

Is your feature request related to a problem? Please describe.

see #257 (comment)

Describe the solution you'd like

xmake build --files=src/main.c <target>
xmake build --files='src/*.c' <target>
xmake build --files 'src/**.c|excluded_file.c;xxx/file1.c;yyy/file2.c' <target>

Path list (windows)

xmake build --files='src/file1.c;src/file2.c'

Path list (unix/linux)

xmake build --files='src/file1.c:src/file2.c'
@OpportunityLiu
Copy link
Member

这样可以吗?

$xmake build -v -P . -w --selected-file="\src\源.c;\src\main.c" test

@OpportunityLiu

This comment has been minimized.

@OpportunityLiu
Copy link
Member

另外,数组分隔符是用 ; 还是 , ,最好尽早统一一下吧,或者另选一个更安全的字符

@waruqi
Copy link
Member Author

waruqi commented Jul 16, 2019

这样可以吗?

$xmake build -v -P . -w --selected-file="\src\源.c;\src\main.c" test

可以通过path.translate做些兼容处理 不过对根 \ 的处理 如果单为了支持vs 处理成相对路径,那在cygwin下就有歧义了

@waruqi
Copy link
Member Author

waruqi commented Jul 16, 2019

另外,数组分隔符是用 ; 还是 , ,最好尽早统一一下吧,或者另选一个更安全的字符

目前像--includedirs里面,现在是通过path.sepenv来分割的 win上传 ; unix上传 :

@waruqi
Copy link
Member Author

waruqi commented Jul 16, 2019

图片
这还是之前那个搞出来的bug?

什么问题?

@OpportunityLiu
Copy link
Member

什么问题?

默认值为nil的帮助就显示不出来了

@OpportunityLiu
Copy link
Member

不过对根 \ 的处理

这个我可以处理一下

@OpportunityLiu
Copy link
Member

图片

@OpportunityLiu OpportunityLiu mentioned this issue Jul 16, 2019
2 tasks
@OpportunityLiu
Copy link
Member

按照xmake的命名惯例是不是应该写成 --selectedfiles ?

@waruqi
Copy link
Member Author

waruqi commented Jul 16, 2019

按照xmake的命名惯例是不是应该写成 --selectedfiles ?

可以,不过我觉得还是太长了,感觉直接叫 --files更妥当些,也正好对应于add_files,selected 只是相对于vs下被选中的files,命令行下感觉有点歧义。

@waruqi
Copy link
Member Author

waruqi commented Jul 16, 2019

什么问题?

默认值为nil的帮助就显示不出来了

这个我等会看下

@OpportunityLiu
Copy link
Member

那就files

@OpportunityLiu

This comment has been minimized.

@waruqi
Copy link
Member Author

waruqi commented Jul 19, 2019

@OpportunityLiu 我初步整完了 测试了下 跟vsxmake配合ok,你这试试

@OpportunityLiu
Copy link
Member

合并了吗?在哪个分支试?

@waruqi
Copy link
Member Author

waruqi commented Jul 19, 2019

恩,我直接rebase到dev了

@OpportunityLiu
Copy link
Member

挺好的,我这里没啥问题,cuda的文件也可以

@waruqi waruqi closed this as completed Jul 19, 2019
@OpportunityLiu
Copy link
Member

有必要把-f就这么分出去吗?这功能应该不是常用功能吧

@waruqi
Copy link
Member Author

waruqi commented Jul 19, 2019

有必要把-f就这么分出去吗?这功能应该不是常用功能吧

是不怎么常用。。去了也可以。

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