You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
The effect is that the compiler is not supposed to issue warnings from these files, just like it doesn't for system libraries, hence the name. See also the CMake docs on this topic.
Background
This library has an awesome amount of warnings enabled. For the users of this library that means that they can usually also have a pretty high warning level enabled and treat warnings as errors. However, once in a while there is a warning generated in the robin_hood.h header. The most recent example was caused by a compiler update and also affected us. Of course, it is great that it was fixed so quickly. But still, if it didn't have effected us in the first place, that would have been even better. As a temporary solution I added the SYSTEM keyword to robin hood's CMakeLists.txt locally and it worked as expected.
Possible downsides
If users are not receiving any warnings anymore from your header, they won't report them either. If this is an issue, maybe SYSTEM could be enabled optionally by a CMake variable?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In CMake, when declaring the include directories, consider adding the
SYSTEM
keyword.This will make CMake create compile commands like this
instead of this
The effect is that the compiler is not supposed to issue warnings from these files, just like it doesn't for system libraries, hence the name. See also the CMake docs on this topic.
Background
This library has an awesome amount of warnings enabled. For the users of this library that means that they can usually also have a pretty high warning level enabled and treat warnings as errors. However, once in a while there is a warning generated in the
robin_hood.h
header. The most recent example was caused by a compiler update and also affected us. Of course, it is great that it was fixed so quickly. But still, if it didn't have effected us in the first place, that would have been even better. As a temporary solution I added theSYSTEM
keyword to robin hood'sCMakeLists.txt
locally and it worked as expected.Possible downsides
If users are not receiving any warnings anymore from your header, they won't report them either. If this is an issue, maybe
SYSTEM
could be enabled optionally by a CMake variable?The text was updated successfully, but these errors were encountered: