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

Allow cxxflags to be defined as empty #5

Closed
2 tasks done
madmongo1 opened this issue Mar 17, 2021 · 1 comment
Closed
2 tasks done

Allow cxxflags to be defined as empty #5

madmongo1 opened this issue Mar 17, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@madmongo1
Copy link

Make sure you completed the following tasks

Environment and version details

All

Describe your use case

When writing CI scripts it is useful to be able to specify some compiler flags in a matrix variable.
If for a given row in the matrix, there are no flags to set this becomes a problem because currently cxxflags=
is an invalid command line component for b2.

A workaround is to include the cxxflags in the matrix variable, i.e.

cxxflags: "cxxflags=-coverage"
...
cxxflags: ""

followed by:

run: b2 <options...> ${{matrix.cxxflags}} <more options...> <targets>

But this feels suboptimal as it splits logic across the script.

Describe the solution you'd like

I would like this to work:

b2 cxxflags= target

Which would then build target with no additional command line flags set. i.e. it would be identical to writing:

b2 target
@madmongo1 madmongo1 added the enhancement New feature or request label Mar 17, 2021
@grafikrobot grafikrobot self-assigned this May 29, 2021
@grafikrobot
Copy link
Member

Note for future reference: This would likely be implemented in the property argument parsing code. It would need to translate feature-name= to either: ignoring the argument for optional features as the value is empty, or allowing an empty value for free features instead an error. Doing the second one is problematic as it would be a likely breaking change as it contrary to existing practice. Which, of note, would be the case for this request as cxxflags is a free feature.

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

No branches or pull requests

2 participants