mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Build certain gtest/gmock tests with -Wno-unused-private-field
Fuchsia is using a newer Clang than I was using on macOS when I wrote these GN targets, and -Wunused-private-field can now detect these violations. Change-Id: If71eb74f6453957aa92852cbe53356e325c7b635 Reviewed-on: https://chromium-review.googlesource.com/833195 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
1764594bff
commit
b51adda8d2
24
third_party/gtest/BUILD.gn
vendored
24
third_party/gtest/BUILD.gn
vendored
@ -147,6 +147,13 @@ test("gtest_param_test") {
|
||||
deps = [
|
||||
":gtest",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags_cc = [
|
||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s Unstreamable::value_.
|
||||
"-Wno-unused-private-field",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
test("gtest_premature_exit_test") {
|
||||
@ -221,12 +228,13 @@ config("gmock_private_config") {
|
||||
config("gmock_public_config") {
|
||||
include_dirs = [ "gtest/googlemock/include" ]
|
||||
|
||||
# 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 until https://github.com/google/googletest/issues/533 is fixed.
|
||||
if (is_clang) {
|
||||
cflags_cc = [
|
||||
# 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 until
|
||||
# https://github.com/google/googletest/issues/533 is fixed.
|
||||
"-Wno-inconsistent-missing-override",
|
||||
]
|
||||
}
|
||||
@ -306,6 +314,14 @@ test("gmock_all_test") {
|
||||
":gmock_main",
|
||||
":gtest",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags_cc = [
|
||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
||||
# testing::gmock_matchers_test::Unprintable::c_.
|
||||
"-Wno-unused-private-field",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
test("gmock_link_test") {
|
||||
|
20
third_party/gtest/gmock.gyp
vendored
20
third_party/gtest/gmock.gyp
vendored
@ -168,6 +168,26 @@
|
||||
'<(gmock_dir)/test/gmock-spec-builders_test.cc',
|
||||
'<(gmock_dir)/test/gmock_test.cc',
|
||||
],
|
||||
'conditions': [
|
||||
['clang!=0', {
|
||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
||||
# Unstreamable::value_.
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wno-unused-private-field',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['OS=="linux" or OS=="android"', {
|
||||
'cflags': [
|
||||
'-Wno-unused-private-field',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'gmock_link_test',
|
||||
|
20
third_party/gtest/gtest.gyp
vendored
20
third_party/gtest/gtest.gyp
vendored
@ -216,6 +216,26 @@
|
||||
'<(gtest_dir)/test/gtest-param-test_test.cc',
|
||||
'<(gtest_dir)/test/gtest-param-test_test.h',
|
||||
],
|
||||
'conditions': [
|
||||
['clang!=0', {
|
||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
||||
# Unstreamable::value_.
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'WARNING_CFLAGS': [
|
||||
'-Wno-unused-private-field',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['OS=="linux" or OS=="android"', {
|
||||
'cflags': [
|
||||
'-Wno-unused-private-field',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'gtest_premature_exit_test',
|
||||
|
Loading…
x
Reference in New Issue
Block a user