net-misc/rustdesk: update deps
[gentoo-zh.git] / app-i18n / mozc / files / mozc-2.26.4220-system_gtest.patch
blob0d52bcab9e100ec693bd4e8be456adb12291acba
1 https://github.com/google/mozc/issues/490
3 --- a/src/gyp/defines.gypi
4 +++ b/src/gyp/defines.gypi
5 @@ -67,6 +67,10 @@
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',
14 'target_defaults': {
15 'defines': [
16 --- a/src/testing/testing.gyp
17 +++ b/src/testing/testing.gyp
18 @@ -59,54 +59,76 @@
19 'targets': [
21 'target_name': 'testing',
22 - 'type': 'static_library',
23 - 'variables': {
24 - 'gtest_defines': [
25 - 'GTEST_LANG_CXX11=1',
26 - 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
27 - ],
28 - 'gtest_dir': '<(third_party_dir)/gtest/googletest',
29 - 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
30 - },
31 - 'sources': [
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',
45 - ],
46 - 'include_dirs': [
47 - '<(gmock_dir)',
48 - '<(gmock_dir)/include',
49 - '<(gtest_dir)',
50 - '<(gtest_dir)/include',
51 - ],
52 - 'defines': [
53 - '<@(gtest_defines)',
54 - ],
55 - 'all_dependent_settings': {
56 - 'defines': [
57 - '<@(gtest_defines)',
58 - ],
59 - 'include_dirs': [
60 - '<(gmock_dir)/include',
61 - '<(gtest_dir)/include',
62 - ],
63 - },
64 'conditions': [
65 - ['(_toolset=="target" and compiler_target=="clang") or '
66 - '(_toolset=="host" and compiler_host=="clang")', {
67 - 'cflags': [
68 - '-Wno-missing-field-initializers',
69 - '-Wno-unused-private-field',
70 + ['use_system_gtest==1', {
71 + 'type': 'none',
72 + 'variables': {
73 + 'gtest_defines': [
74 + 'GTEST_LANG_CXX11=1',
75 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
76 + ],
77 + },
78 + 'all_dependent_settings': {
79 + 'defines': [
80 + '<@(gtest_defines)',
81 + ],
82 + 'link_settings': {
83 + 'libraries': [
84 + '-lgmock -lgtest',
85 + ],
86 + },
87 + },
88 + }, {
89 + 'type': 'static_library',
90 + 'variables': {
91 + 'gtest_defines': [
92 + 'GTEST_LANG_CXX11=1',
93 + 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
94 + ],
95 + 'gtest_dir': '<(third_party_dir)/gtest/googletest',
96 + 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
97 + },
98 + 'sources': [
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',
112 + ],
113 + 'include_dirs': [
114 + '<(gmock_dir)',
115 + '<(gmock_dir)/include',
116 + '<(gtest_dir)',
117 + '<(gtest_dir)/include',
118 + ],
119 + 'defines': [
120 + '<@(gtest_defines)',
121 + ],
122 + 'all_dependent_settings': {
123 + 'defines': [
124 + '<@(gtest_defines)',
125 + ],
126 + 'include_dirs': [
127 + '<(gmock_dir)/include',
128 + '<(gtest_dir)/include',
129 + ],
130 + },
131 + 'conditions': [
132 + ['(_toolset=="target" and compiler_target=="clang") or '
133 + '(_toolset=="host" and compiler_host=="clang")', {
134 + 'cflags': [
135 + '-Wno-missing-field-initializers',
136 + '-Wno-unused-private-field',
137 + ],
138 + }],