-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: Preserve additivity of cmake.define
across overrides
tables
#564
Conversation
I've been thinking about this (also in cibuildwheel) for quite a while, but since there's no "null" option in TOML, there would be no way to un-set an environment variable once set. It's also inconsistent with how other options work. What I've thought of is having a special character/name to indicate that it's going to be additive. Probably "cmake.define+`? |
(Haven't thought through this at all yet, but how about something like Ehh, for some reason I was thinking this was a list. Is there an invalid environment variable name we could use as a key, though? |
What about |
The logic to support the syntax |
(This is moving forward slowly, I'll get back to you once we are happy on a design! I've brought it up with the rest of the cibuildwheel devs at pypa/cibuildwheel#1716) |
If people like pypa/cibuildwheel#1730, we can do the same thing here. |
Speaking on behalf of the team behind GHEX: we like the approach pursued in pypa/cibuildwheel#1730, and the end result will perfectly serve our needs, so green light from our side. If needed, I can gladly offer some help. |
There's some question about the final term ("inherit" vs. "extend", opinions welcome on that issue), but it's mostly finalized. I can look at adding it here too. |
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
d9aab89
to
67d5624
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
122366d
to
a46bda2
Compare
This light-weight PR adds a special rule when overriding
cmake.define
, so that additivity is retained and orthogonal CMake defines are accommodated. Consider the following TOML excerpt:As of now, this would result in
cmake.define
being{"BAR": "1"}
. With the PR,cmake.define
will be{"FOO": 1, "BAR": "1"}
.