mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 07:14:10 +08:00
gtest, gmock: disable incompatible warnings.
gtest and gmock both rely heavily on exit-time destructors, and must build with -Wno-exit-time-destructors to avoid these warnings. gmock’s MOCK_METHODn() macros violate -Wno-inconsistent-missing-override, so this warning is disabled for direct dependents of gmock. R=rsesek@chromium.org Review URL: https://codereview.chromium.org/984393002
This commit is contained in:
parent
56399b2553
commit
db7a933d95
38
third_party/gmock/gmock.gyp
vendored
38
third_party/gmock/gmock.gyp
vendored
@ -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',
|
||||
|
11
third_party/gtest/gtest.gyp
vendored
11
third_party/gtest/gtest.gyp
vendored
@ -53,6 +53,17 @@
|
||||
'sources!': [
|
||||
'gtest/src/gtest-all.cc',
|
||||
],
|
||||
|
||||
# gtest relies heavily on objects with static storage duration.
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS!': [
|
||||
'-Wexit-time-destructors',
|
||||
],
|
||||
},
|
||||
'cflags!': [
|
||||
'-Wexit-time-destructors',
|
||||
],
|
||||
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'gtest/include',
|
||||
|
Loading…
x
Reference in New Issue
Block a user