Getting rid of GetDefaultProfile(), clean up of ProfileManager (which was in a seriou...
[chromium-blink-merge.git] / gpu / gles2_conform_support / gles2_conform_test.gyp
blob71be1f8d8132b0e1d501fc9bc3917742025d23db
1 # Copyright (c) 2013 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.
7   'includes': [
8     'gles2_conform.gypi',
9   ],
10   'target_defaults': {
11     'msvs_disabled_warnings': [4005, 4013, 4018, 4101, 4716],
12      'include_dirs': [
13        '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data',
14        '../../third_party/gles2_conform/GTF_ES/glsl/GTF/Source',
15      ],
16   },
17   'targets': [
18     {
19       'target_name': 'gles2_conform_test',
20       'type': 'executable',
21       'dependencies': [
22         '<(DEPTH)/base/base.gyp:base',
23         '<(DEPTH)/gpu/gpu.gyp:gpu',
24         '<(DEPTH)/testing/gtest.gyp:gtest',
25       ],
26       'sources': [
27         'gles2_conform_test.cc',
28       ],
29       'conditions': [
30         ['internal_gles2_conform_tests', {
31           'dependencies': [
32             'gles2_conform_test_windowless',
33           ],
34           'variables': {
35             'gles2_conform_test_output_dir': '<(SHARED_INTERMEDIATE_DIR)/gpu/gles2_conform_test',
36           },
37           'sources': [
38             '<(gles2_conform_test_output_dir)/gles2_conform_test_autogen.cc',
39           ],
40           'actions': [
41             {
42               'action_name': 'generate_gles2_conform_tests',
43               'inputs': [
44                 'generate_gles2_conform_tests.py',
45                 'gles2_conform_test.h',
46                 '<(DEPTH)/third_party/gles2_conform/GTF_ES/glsl/GTF/mustpass_es20.run',
47               ],
48               'outputs': [
49                 '<(gles2_conform_test_output_dir)/gles2_conform_test_autogen.cc',
50               ],
51               'action': [
52                 'python',
53                 'generate_gles2_conform_tests.py',
54                 '<(gles2_conform_test_output_dir)',
55               ],
56             },
57           ],
58         }], # internal_gles2_conform_tests
59       ],
60     },
61     # TODO(alokp): Add gles2_conform_test_pepper target
62   ],
63   'conditions': [
64     ['internal_gles2_conform_tests', {
65       'targets': [
66         {
67           'target_name': 'gles2_conform_test_embedded_data',
68           'type': 'none',
69           'hard_dependency': 1,
70           'actions': [
71             {
72               'action_name': 'generate_gles2_conform_embedded_files',
73               'variables': {
74                 'generator_path': 'generate_gles2_embedded_data.py',
75               },
76               'inputs': [
77                 '<(generator_path)',
78                 '<!@(python <(generator_path) ../../third_party/gles2_conform/GTF_ES/glsl/GTF)',
79               ],
80               'outputs': [
81                 #'../../third_party/gles2_conform/GTF_ES/glsl/GTF/Source/FilesDATA.c',
82                 #'../../third_party/gles2_conform/GTF_ES/glsl/GTF/Source/FilesDATA.h',
83                 #'../../third_party/gles2_conform/GTF_ES/glsl/GTF/Source/FilesTOC.c',
84                 '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data/FilesDATA.c',
85                 '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data/FilesDATA.h',
86                 '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data/FilesTOC.c',
87               ],
88               'action': [
89                 'python',
90                 '<(generator_path)',
91                 '../../third_party/gles2_conform/GTF_ES/glsl/GTF',
92                 '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data',
93               ],
94             },
95           ],
96         },
97         {
98           'target_name': 'gles2_conform_test_windowless',
99           'type': 'executable',
100           'dependencies': [
101             'gles2_conform_test_embedded_data',
102             '<(DEPTH)/gpu/gles2_conform_support/gles2_conform_support.gyp:egl_native',
103             '<(DEPTH)/gpu/gles2_conform_support/gles2_conform_support.gyp:egl_main_windowless',
104             '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib_nocheck',
105             '<(DEPTH)/third_party/expat/expat.gyp:expat',
106           ],
107           'conditions': [
108             ['OS=="linux"', {
109               'dependencies': ['../../build/linux/system.gyp:gtk'],
110               'conditions': [
111                 [ 'clang==1', {
112                   'cflags': [
113                     '-Wno-array-bounds',
114                     '-Wno-implicit-function-declaration',
115                     '-Wno-incompatible-pointer-types',
116                     '-Wno-parentheses-equality',
117                     '-Wno-pointer-sign',
118                     '-Wno-return-type',
119                     '-Wno-sizeof-pointer-memaccess',
120                     '-Wno-tautological-compare'
121                   ]
122                 }]
123               ],
124             }],
125             ['OS=="win"', {
126               'dependencies': [
127                 '<(angle_path)/src/build_angle.gyp:libGLESv2',
128                 '<(angle_path)/src/build_angle.gyp:libEGL',
129               ],
130               'defines': [
131                 'EGLAPI=',
132                 'EGLAPIENTRY=',
133               ],
134               'msvs_disabled_warnings': [
135                 4018,  # signed/unsigned mismatch
136                 4101,  # unreferenced local variable
137                 4715,  # not all control paths return a value
138               ],
139               'msvs_settings': {
140                 'VCCLCompilerTool': {
141                   'AdditionalOptions': ['/UNOMINMAX'],
142                 },
143               },
144             }],
145             ['OS=="mac"', {
146               'defines': [
147                 '_STDINT',
148                 '_STDINT_H',
149               ],
150               'conditions': [
151                 [ 'clang==1', {
152                   'cflags': [
153                     '-Wno-pointer-sign',
154                     '-Wno-array-bounds',
155                     '-Wno-sizeof-pointer-memaccess',
156                     '-Wno-implicit-function-declaration',
157                     '-Wno-logical-op-parentheses',
158                     '-Wno-tautological-compare',
159                     '-Wno-parentheses-equality',
160                     '-Wno-return-type',
161                   ],
162                   'xcode_settings': {
163                     'LD': 'clang++',
164                     'WARNING_CFLAGS': [
165                       '-Wno-pointer-sign',
166                       '-Wno-array-bounds',
167                       '-Wno-sizeof-pointer-memaccess',
168                       '-Wno-implicit-function-declaration',
169                       '-Wno-logical-op-parentheses',
170                       '-Wno-tautological-compare',
171                       '-Wno-parentheses-equality',
172                       '-Wno-return-type',
173                     ],
174                   },
175                 }],
176               ],
177             }],
178           ],
179           'defines': [
180             'GTF_API=GTF_GLES20',
181             'HKEMBEDDEDFILESYSTEM',
182           ],
183           'sources': [
184             '<@(gtf_es_sources)',
185             # Include a dummy c++ file to force linking of libstdc++.
186             '<(DEPTH)/gpu/gles2_conform_support/dummy.cc',
187           ],
188           'run_as': {
189             'conditions': [
190               ['OS=="win"', {
191                 'action': [
192                   '$(TargetPath)',
193                   '-noimagefileio',
194                   '-run=<(DEPTH)/third_party/gles2_conform/GTF_ES/glsl/GTF/mustpass.run',
195                 ],
196               }],
197             ],
198           },
199         },
200       ],
201     }], # internal_gles2_conform_tests
202     ['OS=="win" and internal_gles2_conform_tests', {
203       'targets': [
204         {
205           'target_name': 'gles2_conform_test_angle',
206           'type': 'executable',
207           'dependencies': [
208             'gles2_conform_test_embedded_data',
209             '<(DEPTH)/base/base.gyp:base',
210             '<(DEPTH)/third_party/expat/expat.gyp:expat',
211             '<(angle_path)/src/build_angle.gyp:libGLESv2',
212             '<(angle_path)/src/build_angle.gyp:libEGL',
213             '<(DEPTH)/gpu/gles2_conform_support/gles2_conform_support.gyp:egl_main_native',
214           ],
215           'defines': [
216             'GTF_API=GTF_GLES20',
217           ],
218           'include_dirs': [
219             '<(DEPTH)/third_party/angle_dx11/include',
220           ],
221           'sources': [
222             '<@(gtf_es_sources)',
223           ],
224         },
225       ],
226     }],
228     ['chromeos==1 and internal_gles2_conform_tests', {
229       'targets': [
230         {
231           'target_name': 'gles2_conform_test_chromeos',
232           'type': 'executable',
233           'dependencies': [
234             'gles2_conform_test_embedded_data',
235             '<(DEPTH)/base/base.gyp:*',
236             '<(DEPTH)/third_party/expat/expat.gyp:expat',
237             '../../build/linux/system.gyp:gtk',
238             '<(DEPTH)/gpu/gles2_conform_support/gles2_conform_support.gyp:egl_main_native',
239           ],
240           'libraries': [
241             '-lEGL',
242             '-lGLESv2',
243           ],
244           'defines': [
245             'GTF_API=GTF_GLES20',
246             'CHROMEOS_GLES2_CONFORMANCE',
247           ],
248           'sources': [
249             '<@(gtf_es_sources)',
250           ],
251         },
252       ],
253     }],
254   ],
258 # Local Variables:
259 # tab-width:2
260 # indent-tabs-mode:nil
261 # End:
262 # vim: set expandtab tabstop=2 shiftwidth=2: