Skip to content

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!

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