Skip to content

Conversation

nyurik
Copy link

@nyurik nyurik commented Feb 9, 2025

Implements #236

Most CMake configurations use the ON|OFF convention to indicate a boolean value. It would be more ergonomic to add a new setter like fn define_bool(&mut self, key: &str, value: bool). Some build.rs scripts could also compute these values during execution, so having this function would simplify

cfg.define("SOMETHING", if flag { "ON" } else { "OFF" });

into

cfg.define_bool("SOMETHING", flag);

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

Successfully merging this pull request may close these issues.

1 participant