-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[-Weffc++] warnings #898
Comments
I don't think Googletest should show up as a "system" header to work around a build config issue. |
see discussion in issue#898 |
This way if a user want's to enforce the |
I don't know what warnings this flag produces, but if it's reasonable to work around it, let's. |
BTW, this flag has nothing to do with "efficiency". "-Weffc++ (C++ and Objective-C++ only) Warn about violations of the following style guidelines from Scott Meyers' Effective C++ series of books" https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html Now I'm less excited about this. Also: "When selecting this option, be aware that the standard library headers do not obey all of these guidelines; use ‘grep -v’ to filter out those warnings." Can you use grep -v similarly on googletest? |
Yeah, I myself am struggling lately if this option is even something I want to use on a daily basis. the
For the errors I did the following:
Most of these warnings mention the variables not set in the initialization list.
|
GCC's Changing modern projects to avoid unhelpful |
I have been cleaning up older and inactive GitHub googletest issues. You may see an issue "closed" if it appears to be inactive/abandoned |
When including this as a subdirectory using CMake, a lot of C++ efficiency warnings show op when the
-Weffc++
flag is set.I'm doing the following in my root
CMakeLists.txt
file:This can be fixed by passing the
SYSTEM
variable to theinclude_directories()
command.This way the headers will be seen as "system" headers.
The user can do the same in his or her CMakeLists.txt
The text was updated successfully, but these errors were encountered: