-
Notifications
You must be signed in to change notification settings - Fork 162
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
Mark project files as SYSTEM when not standalone #158
Comments
Thank you for reporting the issue, I reproduced it. I also found that it passes the tests if we reduced the level of warning as Thank you again! |
It should be possible to suppress the warnings within the tomll11 CMake
code on users behalf. Take GSL as an example, it detects when the code is
being used directly by a user and sets the SYSTEM attribute automatically
on all GSL include directories. The same should be possible here with very
little work.
…On Tue, 4 May 2021, 12:41 pm Toru Niina, ***@***.***> wrote:
Thank you for reporting the issue, I reproduced it.
If I'm not mistaken, the reason of the warning is the name of enum class
toml::value_t; and typedefs. I think it is difficult to avoid the problem
without changing the name of enumerator names and type names, but it is
also difficult to change the typenames for the sake of backward
compatibility. So I think I need to, as you said, inform users to set
SYSTEM in target_include_directories to avoid this issue. I will add it
to the README. I will also consider to add some pragmas to avoid this
issue automatically.
I also found that it passes the tests if we reduced the level of warning
as -Wshadow=local in a particular version of gcc in my local machine. I
will examine a bit more and add the warning to the CI build if possible.
Thank you again!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL5LS3CAPF3PLVA7MRKOKWDTL6XLHANCNFSM44ATOZSA>
.
|
I have suppressed the error related to |
Hi toml is failing to compile again with -Werror=free-nonheap-object. The root solution to this is that we need to make all toml files as system when toml is included as a subdirectory. Can we reopen this please. |
Currently user code compiled with -Wshadow is failing when trying to use toml due to warnings in toml/types.hpp. CMake has an inbuilt mechanism (SYSTEM) to suppress warnings in header files of third party libraries. This should be enabled for toml to prevent issues in header files from breaking users who use the library from source. See https://github.com/microsoft/GSL/blob/main/include/CMakeLists.txt as an example.
The text was updated successfully, but these errors were encountered: