Ignore objc-property-no-attribute warning for classdump generated file.
[chromium-blink-merge.git] / testing / iossim / iossim.gyp
bloba78f024ab1e927f9cefc36769df12e9715b6b188
1 # Copyright (c) 2012 The Chromium 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.
6   'conditions': [
7     ['OS!="ios" or "<(GENERATOR)"=="ninja"', {
8       'targets': [
9         {
10           'target_name': 'iossim',
11           'toolsets': ['host'],
12           'type': 'executable',
13           'variables': {
14             'developer_dir': '<!(xcode-select -print-path)',
15             'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
16             'other_frameworks_path': '<(developer_dir)/../OtherFrameworks'
17           },
18           'dependencies': [
19             'third_party/class-dump/class-dump.gyp:class-dump#host',
20           ],
21           'include_dirs': [
22             '<(INTERMEDIATE_DIR)/iossim',
23           ],
24           'sources': [
25             'iossim.mm',
26             '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
27           ],
28           'libraries': [
29             '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
30           ],
31           'actions': [
32             {
33               'action_name': 'generate_iphone_sim_header',
34               'inputs': [
35                 '<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versions/Current/iPhoneSimulatorRemoteClient',
36                 '<(PRODUCT_DIR)/class-dump',
37               ],
38               'outputs': [
39                 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h'
40               ],
41               'action': [
42                 # Actions don't provide a way to redirect stdout, so a custom
43                 # script is invoked that will execute the first argument and write
44                 # the output to the file specified as the second argument.
45                 './redirect-stdout.sh',
46                 '<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework',
47                 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
48               ],
49               'message': 'Generating header',
50             },
51           ],
52           'xcode_settings': {
53             'WARNING_CFLAGS': [
54               '-Wno-objc-property-no-attribute',
55             ],
56           },
57         },
58       ],
59     }, {  # else, OS=="ios" and "<(GENERATOR)"!="ninja"
60       'variables': {
61         'ninja_output_dir': 'ninja-iossim',
62         'ninja_product_dir':
63           '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
64       },
65       'targets': [
66         {
67           'target_name': 'iossim',
68           'type': 'none',
69           'variables': {
70             # Gyp to rerun
71             're_run_targets': [
72                'testing/iossim/iossim.gyp',
73             ],
74           },
75           'includes': ['../../build/ios/mac_build.gypi'],
76           'actions': [
77             {
78               'action_name': 'compile iossim',
79               'inputs': [],
80               'outputs': [],
81               'action': [
82                 '<@(ninja_cmd)',
83                 'iossim',
84               ],
85               'message': 'Generating the iossim executable',
86             },
87           ],
88         },
89       ],
90     }],
91   ],