• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3# found in the LICENSE file.
4
5{
6  'targets': [
7    {
8      'target_name': 'gtest',
9      'toolsets': ['host', 'target'],
10      'type': 'static_library',
11      'sources': [
12        'gtest/include/gtest/gtest-death-test.h',
13        'gtest/include/gtest/gtest-message.h',
14        'gtest/include/gtest/gtest-param-test.h',
15        'gtest/include/gtest/gtest-printers.h',
16        '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_pred_impl.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',
41      ],
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': [
50        'gtest_prod',
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      ],
76      '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': [
84          ['_type=="executable"', {
85            'test': 1,
86            'conditions': [
87              ['OS=="mac"', {
88                'run_as': {
89                  'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'],
90                },
91              }],
92              ['OS=="win"', {
93                'run_as': {
94                  'action????': ['$(TargetPath)', '--gtest_print_time'],
95                },
96              }],
97            ],
98          }],
99        ],
100        'msvs_disabled_warnings': [4800],
101      },
102    },
103    {
104      'target_name': 'gtest_main',
105      'type': 'static_library',
106      'dependencies': [
107        'gtest',
108      ],
109      'sources': [
110        'gtest/src/gtest_main.cc',
111      ],
112    },
113    {
114      'target_name': 'gtest_prod',
115      'toolsets': ['host', 'target'],
116      'type': 'none',
117      'sources': [
118        'gtest/include/gtest/gtest_prod.h',
119      ],
120    },
121  ],
122}
123