Skip to content

Conversation

@tobbi
Copy link
Member

@tobbi tobbi commented Aug 9, 2024

Instead of having different warning flags per compiler, check for each flag if the compiler supports it and then add it

@tobbi
Copy link
Member Author

tobbi commented Aug 9, 2024

#3029 for reference

@tobbi
Copy link
Member Author

tobbi commented Aug 9, 2024

https://www.foonathan.net/2018/10/cmake-warnings/

The trick is to use target_include_directories(my_library SYSTEM PUBLIC include/). The SYSTEM turns the include directory into a system include directory. Compilers will not issue warnings from header files originating from there.

@tobbi tobbi marked this pull request as draft August 9, 2024 23:57
@tobbi tobbi force-pushed the rework_warning_flags branch from ce6494c to b6d9493 Compare August 19, 2024 00:54
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