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  'variables': {
7    'v8_code': 1,
8  },
9  'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
10  'targets': [
11    {
12      'target_name': 'run-all-unittests',
13      'type': 'static_library',
14      'variables': {
15        'optimize': 'max',
16      },
17      'dependencies': [
18        '../../testing/gmock.gyp:gmock',
19        '../../testing/gtest.gyp:gtest',
20        '../../tools/gyp/v8.gyp:v8_libplatform',
21      ],
22      'include_dirs': [
23        '../..',
24      ],
25      'sources': [  ### gcmole(all) ###
26        'run-all-unittests.cc',
27        'test-utils.h',
28        'test-utils.cc',
29      ],
30      'export_dependent_settings': [
31        '../../testing/gmock.gyp:gmock',
32        '../../testing/gtest.gyp:gtest',
33      ],
34      'conditions': [
35        ['component=="shared_library"', {
36          # compiler-unittests can't be built against a shared library, so we
37          # need to depend on the underlying static target in that case.
38          'conditions': [
39            ['v8_use_snapshot=="true"', {
40              'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
41            },
42            {
43              'dependencies': [
44                '../../tools/gyp/v8.gyp:v8_nosnapshot',
45              ],
46            }],
47          ],
48        }, {
49          'dependencies': ['../../tools/gyp/v8.gyp:v8'],
50        }],
51        ['os_posix == 1', {
52          # TODO(svenpanne): This is a temporary work-around to fix the warnings
53          # that show up because we use -std=gnu++0x instead of -std=c++11.
54          'cflags!': [
55            '-pedantic',
56          ],
57          'direct_dependent_settings': {
58            'cflags!': [
59              '-pedantic',
60            ],
61          },
62        }],
63        ['want_separate_host_toolset==1', {
64          'toolsets': ['host', 'target'],
65        }, {
66          'toolsets': ['target'],
67        }],
68      ],
69    },
70  ],
71}
72