-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
BuildTarget: Add ignore_project_(link_)args() kwarg #3520
base: master
Are you sure you want to change the base?
Conversation
When all targets must use some args in a project with the exception of a few, it's easier to use add_project_(link_)args() and flag only the few exceptions instead of having to set link_args/c_args on all targets.
@@ -72,6 +72,9 @@ This function behaves in the same way as `add_global_arguments` except | |||
that the arguments are only used for the current project, they won't | |||
be used in any other subproject. | |||
|
|||
Since 0.47.0 those flags can be ignored by by some targets by setting their |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*these, same below
@@ -474,6 +480,10 @@ be passed to [shared and static libraries](#library). | |||
in the D programming language | |||
- `d_unittest`, when set to true, the D modules are compiled in debug mode | |||
- `d_module_versions` list of module versions set when compiling D sources | |||
- `ignore_project_args` Ignore arguments added via | |||
[`add_project_arguments()`](#add_project_arguments)? Since 0.47.0. | |||
- `ignore_project_link_args` Ignore arguments added via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be phrased as "when set to true, ignore arguments [...]` otherwise people may not realize what values should be passed to these.
@@ -0,0 +1,6 @@ | |||
## ignore project arguments in some targets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*Ignore
app = executable('testapp', 'main.c', | ||
ignore_project_args : true, | ||
ignore_project_link_args : true, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be included in the 123 subproject project arguments
test? I mention this because adding new tests has more test time overhead than adding a few lines to an existint test.
I wonder if it would be better to have an |
Do people still see value in this? Not sure that I do. Any real-world use-cases people want this for? This just seems like people being too liberal with add_project_arguments() |
When all targets must use some args in a project with the exception of a
few, it's easier to use add_project_(link_)args() and flag only the few
exceptions instead of having to set link_args/c_args on all targets.