OLD | NEW |
1 # Copyright 2014 the V8 project authors. All rights reserved. | 1 # Copyright 2014 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'targets': [ | 6 'targets': [ |
7 { | 7 { |
8 'target_name': 'gtest', | 8 'target_name': 'gtest', |
9 'toolsets': ['host', 'target'], | 9 'toolsets': ['host', 'target'], |
10 'type': 'static_library', | 10 'type': 'static_library', |
11 'sources': [ | 11 'sources': [ |
| 12 # This file is not really needed by the GYP build, but it is needed by |
| 13 # the GN build. See BUILD.gn for details. |
| 14 'gtest/empty.cc', |
| 15 |
12 'gtest/include/gtest/gtest-death-test.h', | 16 'gtest/include/gtest/gtest-death-test.h', |
13 'gtest/include/gtest/gtest-message.h', | 17 'gtest/include/gtest/gtest-message.h', |
14 'gtest/include/gtest/gtest-param-test.h', | 18 'gtest/include/gtest/gtest-param-test.h', |
15 'gtest/include/gtest/gtest-printers.h', | |
16 'gtest/include/gtest/gtest-spi.h', | 19 'gtest/include/gtest/gtest-spi.h', |
17 'gtest/include/gtest/gtest-test-part.h', | |
18 'gtest/include/gtest/gtest-typed-test.h', | |
19 'gtest/include/gtest/gtest.h', | 20 'gtest/include/gtest/gtest.h', |
20 'gtest/include/gtest/gtest_pred_impl.h', | 21 'gtest/include/gtest/gtest_prod.h', |
21 'gtest/include/gtest/internal/gtest-death-test-internal.h', | |
22 'gtest/include/gtest/internal/gtest-filepath.h', | |
23 'gtest/include/gtest/internal/gtest-internal.h', | |
24 'gtest/include/gtest/internal/gtest-linked_ptr.h', | |
25 'gtest/include/gtest/internal/gtest-param-util-generated.h', | |
26 'gtest/include/gtest/internal/gtest-param-util.h', | |
27 'gtest/include/gtest/internal/gtest-port.h', | |
28 'gtest/include/gtest/internal/gtest-string.h', | |
29 'gtest/include/gtest/internal/gtest-tuple.h', | |
30 'gtest/include/gtest/internal/gtest-type-util.h', | |
31 'gtest/src/gtest-all.cc', | |
32 'gtest/src/gtest-death-test.cc', | |
33 'gtest/src/gtest-filepath.cc', | |
34 'gtest/src/gtest-internal-inl.h', | |
35 'gtest/src/gtest-port.cc', | |
36 'gtest/src/gtest-printers.cc', | |
37 'gtest/src/gtest-test-part.cc', | |
38 'gtest/src/gtest-typed-test.cc', | |
39 'gtest/src/gtest.cc', | |
40 'gtest-support.h', | 22 'gtest-support.h', |
41 ], | 23 ], |
42 'sources!': [ | |
43 'gtest/src/gtest-all.cc', # Not needed by our build. | |
44 ], | |
45 'include_dirs': [ | |
46 'gtest', | |
47 'gtest/include', | |
48 ], | |
49 'dependencies': [ | 24 'dependencies': [ |
50 'gtest_prod', | 25 '../third_party/googletest/googletest.gyp:googletest', |
51 ], | |
52 'defines': [ | |
53 # In order to allow regex matches in gtest to be shared between Windows | |
54 # and other systems, we tell gtest to always use it's internal engine. | |
55 'GTEST_HAS_POSIX_RE=0', | |
56 'GTEST_LANG_CXX11=1', | |
57 ], | |
58 'all_dependent_settings': { | |
59 'defines': [ | |
60 'GTEST_HAS_POSIX_RE=0', | |
61 'GTEST_LANG_CXX11=1', | |
62 ], | |
63 }, | |
64 'conditions': [ | |
65 ['OS=="android"', { | |
66 'defines': [ | |
67 'GTEST_HAS_CLONE=0', | |
68 ], | |
69 'direct_dependent_settings': { | |
70 'defines': [ | |
71 'GTEST_HAS_CLONE=0', | |
72 ], | |
73 }, | |
74 }], | |
75 ], | 26 ], |
76 'direct_dependent_settings': { | 27 'direct_dependent_settings': { |
77 'defines': [ | |
78 'UNIT_TEST', | |
79 ], | |
80 'include_dirs': [ | |
81 'gtest/include', # So that gtest headers can find themselves. | |
82 ], | |
83 'target_conditions': [ | 28 'target_conditions': [ |
84 ['_type=="executable"', { | 29 ['_type=="executable"', { |
85 'test': 1, | 30 'test': 1, |
86 'conditions': [ | 31 'conditions': [ |
87 ['OS=="mac"', { | 32 ['OS=="mac"', { |
88 'run_as': { | 33 'run_as': { |
89 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], | 34 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], |
90 }, | 35 }, |
91 }], | 36 }], |
92 ['OS=="win"', { | 37 ['OS=="win"', { |
93 'run_as': { | 38 'run_as': { |
94 'action????': ['$(TargetPath)', '--gtest_print_time'], | 39 'action????': ['$(TargetPath)', '--gtest_print_time'], |
95 }, | 40 }, |
96 }], | 41 }], |
97 ], | 42 ], |
98 }], | 43 }], |
99 ], | 44 ], |
100 'msvs_disabled_warnings': [4800], | |
101 }, | 45 }, |
102 }, | 46 }, |
103 { | 47 { |
104 'target_name': 'gtest_main', | 48 'target_name': 'gtest_main', |
105 'type': 'static_library', | 49 'type': 'static_library', |
106 'dependencies': [ | 50 'dependencies': [ |
107 'gtest', | 51 '../third_party/googletest/googletest.gyp:googletest_main', |
108 ], | |
109 'sources': [ | |
110 'gtest/src/gtest_main.cc', | |
111 ], | 52 ], |
112 }, | 53 }, |
113 { | 54 { |
114 'target_name': 'gtest_prod', | 55 'target_name': 'gtest_prod', |
115 'toolsets': ['host', 'target'], | 56 'toolsets': ['host', 'target'], |
116 'type': 'none', | 57 'type': 'none', |
117 'sources': [ | 58 'dependencies': [ |
118 'gtest/include/gtest/gtest_prod.h', | 59 '../third_party/googletest/googletest.gyp:googletest_prod', |
119 ], | 60 ], |
120 }, | 61 }, |
121 ], | 62 ], |
122 } | 63 } |
OLD | NEW |