summaryrefslogtreecommitdiff
path: root/deps/gyp/test/mac/objc-gc/test.gyp
blob: 4d827c1b39c5435e3a3da9c5a102cd77e9c61e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
  'targets': [
    # For some reason, static_library targets that are built with gc=required
    # and then linked to executables that don't use gc, the linker doesn't
    # complain. For shared_libraries it does, so use that.
    {
      'target_name': 'no_gc_lib',
      'type': 'shared_library',
      'sources': [
        'c-file.c',
        'cc-file.cc',
        'needs-gc-mm.mm',
        'needs-gc.m',
      ],
    },
    {
      'target_name': 'gc_lib',
      'type': 'shared_library',
      'sources': [
        'c-file.c',
        'cc-file.cc',
        'needs-gc-mm.mm',
        'needs-gc.m',
      ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'supported',
      },
    },
    {
      'target_name': 'gc_req_lib',
      'type': 'shared_library',
      'sources': [
        'c-file.c',
        'cc-file.cc',
        'needs-gc-mm.mm',
        'needs-gc.m',
      ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'required',
      },
    },

    {
      'target_name': 'gc_exe_fails',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'no_gc_lib' ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'required',
      },
      'libraries': [ 'Foundation.framework' ],
    },
    {
      'target_name': 'gc_req_exe',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'gc_lib' ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'required',
      },
      'libraries': [ 'Foundation.framework' ],
    },
    {
      'target_name': 'gc_exe_req_lib',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'gc_req_lib' ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'supported',
      },
      'libraries': [ 'Foundation.framework' ],
    },
    {
      'target_name': 'gc_exe',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'gc_lib' ],
      'xcode_settings': {
        'GCC_ENABLE_OBJC_GC': 'supported',
      },
      'libraries': [ 'Foundation.framework' ],
    },
    {
      'target_name': 'gc_off_exe_req_lib',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'gc_req_lib' ],
      'libraries': [ 'Foundation.framework' ],
    },
    {
      'target_name': 'gc_off_exe',
      'type': 'executable',
      'sources': [ 'main.m' ],
      'dependencies': [ 'gc_lib' ],
      'libraries': [ 'Foundation.framework' ],
    },
  ],
}