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

[C++][CMake] Allocators not disabled for sanitizer cmake presets #45209

Closed
zanmato1984 opened this issue Jan 9, 2025 · 1 comment
Closed

Comments

@zanmato1984
Copy link
Contributor

zanmato1984 commented Jan 9, 2025

Describe the enhancement requested

In #45207 I added sanitizer cmake presets and combined them with ninja-debug preset. It turns out setting ARROW_MIMALLOC=OFF didn't work because features-main (inherited by ninja-debug) sets it to ON and the cmake policy of resolving conflicting variables from multiple presets is "first-win".

Quoting cmake doc:

If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits array will be preferred.

Component(s)

C++

zanmato1984 added a commit that referenced this issue Jan 10, 2025
…sanitizer cmake presets (#45210)

### Rationale for this change

I gave the reason in #45209

### What changes are included in this PR?

Adjust the inheritance list order and make a lot of simplification/regrouping/reordering for existing presets the way I see fit.

Also introduce a soft rule to order inheritance list: `sanitizer` comes before `features` comes before `base`. Though we can't really mandate such a rule (thus it's "soft") or make it clear in comments (our current cmake dosn't support comment in json), we hope people will notice this pattern and follow it when editing this file.

### Are these changes tested?

Manually tested.

### Are there any user-facing changes?

None.

* GitHub Issue: #45209

Lead-authored-by: Rossi Sun <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Rossi Sun <[email protected]>
@zanmato1984 zanmato1984 added this to the 20.0.0 milestone Jan 10, 2025
@zanmato1984
Copy link
Contributor Author

Issue resolved by pull request 45210
#45210

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

1 participant