Skip to content
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

cpp runtime cmake: add -Wno-overloaded-virtual to any target that includes generated headers #4254

Open
jpy794 opened this issue May 4, 2023 · 0 comments

Comments

@jpy794
Copy link

jpy794 commented May 4, 2023

Currently antlr4-generator cmake package only adds -Wno-overloaded-virtual flag to lexer / parser obj, but not to the target that includes generated headers. Since both gcc and clang add this flag to -Wall, it seems to be reasonable to handle this in antlr4-generator package.

Maybe we could create a target in antlr4-generator so that we could add something like this to solve the problem? Just a wild guess.

# antlr4-generator-config.cmake
# ...
target_compile_options(
    target_name
    PUBLIC -Wno-overloaded-virtual
)
# ...

I don't know if there's any plan to remove this flag from antlr4 cpp runtime, which should also be a good solution.

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

No branches or pull requests

1 participant