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

Added -Wno-suggest-override flags to tests. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cemeceme
Copy link

@cemeceme cemeceme commented Dec 4, 2023

Workaround for #30.

This makes it possible to run tests in an environment where -Werror=suggest-override and -Werror may be set.
Ideally, unittest-cpp would handle this itself, but seeing as that project seems to be on indefinite hiatus, this will at least get the cc-rules themselves to work.

Do note that this is not a complete fix and only handles the issue with suggest-override however this appeared to be the only issue in my environment. Other breaking flags can be added as they are found.

It should also be noted that any source files that need to use #include <UnitTest++/UnitTest++.h> must still wrap the contents with

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#include <UnitTest++/UnitTest++.h>

/// Contents of test code file

#pragma GCC diagnostic pop

or equivalent.

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.

1 participant