-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add target.del_headerfiles #1939
Comments
you can use |
It won't work with my code (and when I'll have multiples subfolder I guess), since I add files for both targets but want to remove files for only one |
At present, I am not very satisfied with the naming convention of del_files, so I have not added other interfaces. |
For reference: So it seems delete and remove are the two common keywords for this, since |
Also thinking about it, a word that I haven't seen in other build tools is, but may be more clear, is "exclude" ( |
Thank you, I think remove_files and remove_headerfiles are better. |
meson's "delete" command is for the scriptable tool to edit the build definition files. I think the concept you are working with here has more to do with inheritance, and specifically partial inheritance? i.e. targets seem to have sub-targets that inherit the list of associated source files, and you can restrict that by later on by removing some of those files from the target node. This is definitely not something meson has an equivalent to, since meson supports neither globs nor target inheritance. Instead, one would simply create two meson arrays, and add one set of files to one target and both sets of files to the other target. Also meson's rewriter uses |
I have added |
It has been merge into dev now. |
I get errors error: @programdir\core\main.lua:280: @programdir\core\project\target.lua:1515: bad argument #1 to 'remove' (position out of bounds)
stack traceback:
[C]: in function 'remove'
[@programdir\core\project\target.lua:1515]: in function 'pred'
[@programdir\core\base\table.lua:458]: in function 'remove_if'
[@programdir\core\project\target.lua:1507]: in function 'headerfiles'
[@programdir\plugins\project\vstudio\impl\vs201x.lua:572]: in function 'make'
[@programdir\plugins\project\vstudio\vs.lua:50]: in function '?'
[@programdir\plugins\project\main.lua:79]: in function '_make'
[@programdir\plugins\project\main.lua:89]:
[C]: in function 'xpcall'
[@programdir\core\base\utils.lua:280]:
[@programdir\core\base\task.lua:519]: in function 'run'
[@programdir\core\main.lua:278]: in function 'cotask'
[@programdir\core\base\scheduler.lua:371]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:827: in function 'base/os.raiselevel'
(...tail calls...)
@programdir\core\main.lua:280: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:371: in function <@programdir\core\base\scheduler.lua:368> |
Try it again. |
It works well, thank you! |
Is your feature request related to a problem? Please describe.
I'm using
add_files
thendel_files
to remove some files which shouldn't be part of it, and now I would like to add headerfiles (and remove some which shouldn't be part of it).To be clear, here's what I have:
Describe the solution you'd like
Since
add_files
hasdel_files
, it would be logical to havedel_headerfiles
too.I tried to add it myself to make a PR (it doesn't seem very complicated) but I'm not comfortable enough yet with xmake internals.
Describe alternatives you've considered
Add every header subfolder myself except those I don't wan't, but since del_files exists it seems del_headerfiles would be a nice addition
The text was updated successfully, but these errors were encountered: