1 https://github.com/google/mozc/issues/490
3 --- a/src/gyp/defines.gypi
4 +++ b/src/gyp/defines.gypi
6 # use_system_abseil_cpp represents if system version or bundled version
7 # of abseil-cpp library is used.
8 'use_system_abseil_cpp%': '0',
10 + # use_system_gtest represents if system version or bundled version
11 + # of gtest library is used.
12 + 'use_system_gtest%': '0',
16 --- a/src/testing/testing.gyp
17 +++ b/src/testing/testing.gyp
21 'target_name': 'testing',
22 - 'type': 'static_library',
25 - 'GTEST_LANG_CXX11=1',
26 - 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
28 - 'gtest_dir': '<(third_party_dir)/gtest/googletest',
29 - 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
32 - '<(gmock_dir)/src/gmock-cardinalities.cc',
33 - '<(gmock_dir)/src/gmock-internal-utils.cc',
34 - '<(gmock_dir)/src/gmock-matchers.cc',
35 - '<(gmock_dir)/src/gmock-spec-builders.cc',
36 - '<(gmock_dir)/src/gmock.cc',
37 - '<(gtest_dir)/src/gtest-death-test.cc',
38 - '<(gtest_dir)/src/gtest-filepath.cc',
39 - '<(gtest_dir)/src/gtest-matchers.cc',
40 - '<(gtest_dir)/src/gtest-port.cc',
41 - '<(gtest_dir)/src/gtest-printers.cc',
42 - '<(gtest_dir)/src/gtest-test-part.cc',
43 - '<(gtest_dir)/src/gtest-typed-test.cc',
44 - '<(gtest_dir)/src/gtest.cc',
48 - '<(gmock_dir)/include',
50 - '<(gtest_dir)/include',
53 - '<@(gtest_defines)',
55 - 'all_dependent_settings': {
57 - '<@(gtest_defines)',
60 - '<(gmock_dir)/include',
61 - '<(gtest_dir)/include',
65 - ['(_toolset=="target" and compiler_target=="clang") or '
66 - '(_toolset=="host" and compiler_host=="clang")', {
68 - '-Wno-missing-field-initializers',
69 - '-Wno-unused-private-field',
70 + ['use_system_gtest==1', {
74 + 'GTEST_LANG_CXX11=1',
75 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
78 + 'all_dependent_settings': {
80 + '<@(gtest_defines)',
89 + 'type': 'static_library',
92 + 'GTEST_LANG_CXX11=1',
93 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
95 + 'gtest_dir': '<(third_party_dir)/gtest/googletest',
96 + 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
99 + '<(gmock_dir)/src/gmock-cardinalities.cc',
100 + '<(gmock_dir)/src/gmock-internal-utils.cc',
101 + '<(gmock_dir)/src/gmock-matchers.cc',
102 + '<(gmock_dir)/src/gmock-spec-builders.cc',
103 + '<(gmock_dir)/src/gmock.cc',
104 + '<(gtest_dir)/src/gtest-death-test.cc',
105 + '<(gtest_dir)/src/gtest-filepath.cc',
106 + '<(gtest_dir)/src/gtest-matchers.cc',
107 + '<(gtest_dir)/src/gtest-port.cc',
108 + '<(gtest_dir)/src/gtest-printers.cc',
109 + '<(gtest_dir)/src/gtest-test-part.cc',
110 + '<(gtest_dir)/src/gtest-typed-test.cc',
111 + '<(gtest_dir)/src/gtest.cc',
115 + '<(gmock_dir)/include',
117 + '<(gtest_dir)/include',
120 + '<@(gtest_defines)',
122 + 'all_dependent_settings': {
124 + '<@(gtest_defines)',
127 + '<(gmock_dir)/include',
128 + '<(gtest_dir)/include',
132 + ['(_toolset=="target" and compiler_target=="clang") or '
133 + '(_toolset=="host" and compiler_host=="clang")', {
135 + '-Wno-missing-field-initializers',
136 + '-Wno-unused-private-field',