Skip to content

Introducing option NB_SUPPRESS_WARNINGS to nanobind_add_module #868

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

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

mijoku
Copy link
Contributor

@mijoku mijoku commented Jan 20, 2025

With this change compile commands generated by cmake for targets consuming nanobind use -isystem instead of -I for defining nanobind's header locations, which makes modern analysis tools (e.g. clang-analyzer) ignore them.

With this change compile commands generated by cmake for targets consuming nanobind use `-isystem`  instead of `-I` for defining nanobind's header locations, which makes modern analysis tools (e.g. clang analyzer) ignore them.
@wjakob
Copy link
Owner

wjakob commented Jan 27, 2025

Hello @mijoku, given that a number of people have been requesting this feature, I am willing to change my mind and consider it. But not as a default -- this is something that the user will need to request explicitly.

Using option `NB_SUPPRESS_WARNINGS` on function `add_nanobind_module` to
enable this behaviour.
@mijoku
Copy link
Contributor Author

mijoku commented Jan 27, 2025

Hello @mijoku, given that a number of people have been requesting this feature, I am willing to change my mind and consider it. But not as a default -- this is something that the user will need to request explicitly.

Thanks for the feedback. I introduced option NB_SUPPRESS_WARNINGS to nanobind_add_module to enable the intended behaviour. I hope, the option-naming is to your liking. Otherwise, I'm more than happy to incorporate suggestions.
I also tried to include some documentation, but please adapt the wording to something more of your liking.

@mijoku mijoku changed the title Make public include directories SYSTEM-includes Introducing option NB_SUPPRESS_WARNINGS to nanobind_add_module Jan 27, 2025
@wjakob
Copy link
Owner

wjakob commented Jan 30, 2025

Thanks!

@wjakob wjakob merged commit 0c80eec into wjakob:master Jan 30, 2025
31 checks passed
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.

2 participants