Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1280)

Unified Diff: third_party/gmock/gmock.gyp

Issue 984393002: gtest, gmock: disable incompatible warnings (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Compatibility with pre-3.6 clang Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/gtest/gtest.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gmock/gmock.gyp
diff --git a/third_party/gmock/gmock.gyp b/third_party/gmock/gmock.gyp
index 3a1dcdad4955b8c4bac0a2db8418187d6d2b4122..b9e5f186e22b7da4b7173d178a492fbb6c08850c 100644
--- a/third_party/gmock/gmock.gyp
+++ b/third_party/gmock/gmock.gyp
@@ -49,10 +49,48 @@
'sources!': [
'gmock/src/gmock-all.cc',
],
+
+ # gmock relies heavily on objects with static storage duration.
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': [
+ '-Wexit-time-destructors',
+ ],
+ },
+ 'cflags!': [
+ '-Wexit-time-destructors',
+ ],
+
'direct_dependent_settings': {
'include_dirs': [
'gmock/include',
],
+ 'conditions': [
+ ['clang!=0', {
+ # The MOCK_METHODn() macros do not specify “override”, which
+ # triggers this warning in users: “error: 'Method' overrides a
+ # member function but is not marked 'override'
+ # [-Werror,-Winconsistent-missing-override]”. Suppress these
+ # warnings, and add -Wno-unknown-warning-option because only recent
+ # versions of clang (trunk r220703 and later, version 3.6 and
+ # later) recognize it.
+ 'conditions': [
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'WARNING_CFLAGS': [
+ '-Wno-inconsistent-missing-override',
+ '-Wno-unknown-warning-option',
+ ],
+ },
+ }],
+ ['OS=="linux"', {
+ 'cflags': [
+ '-Wno-inconsistent-missing-override',
+ '-Wno-unknown-warning-option',
+ ],
+ }],
+ ],
+ }],
+ ],
},
'export_dependent_settings': [
'../gtest/gtest.gyp:gtest',
« no previous file with comments | « no previous file | third_party/gtest/gtest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698