meson.build revision 9f464c52
101e04c3fSmrg# Copyright © 2017 Intel Corporation
201e04c3fSmrg
301e04c3fSmrg# Permission is hereby granted, free of charge, to any person obtaining a copy
401e04c3fSmrg# of this software and associated documentation files (the "Software"), to deal
501e04c3fSmrg# in the Software without restriction, including without limitation the rights
601e04c3fSmrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
701e04c3fSmrg# copies of the Software, and to permit persons to whom the Software is
801e04c3fSmrg# furnished to do so, subject to the following conditions:
901e04c3fSmrg
1001e04c3fSmrg# The above copyright notice and this permission notice shall be included in
1101e04c3fSmrg# all copies or substantial portions of the Software.
1201e04c3fSmrg
1301e04c3fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1401e04c3fSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1501e04c3fSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1601e04c3fSmrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1701e04c3fSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1801e04c3fSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1901e04c3fSmrg# SOFTWARE.
2001e04c3fSmrg
2101e04c3fSmrg# TODO: android?
2201e04c3fSmrg
2301e04c3fSmrgfiles_libintel_common = files(
2401e04c3fSmrg  'gen_clflush.h',
2501e04c3fSmrg  'gen_batch_decoder.c',
2601e04c3fSmrg  'gen_decoder.c',
2701e04c3fSmrg  'gen_decoder.h',
2801e04c3fSmrg  'gen_disasm.c',
2901e04c3fSmrg  'gen_disasm.h',
3001e04c3fSmrg  'gen_gem.h',
3101e04c3fSmrg  'gen_l3_config.c',
3201e04c3fSmrg  'gen_l3_config.h',
3301e04c3fSmrg  'gen_urb_config.c',
3401e04c3fSmrg  'gen_sample_positions.h',
3501e04c3fSmrg  'intel_log.c',
3601e04c3fSmrg)
3701e04c3fSmrg
3801e04c3fSmrglibintel_common = static_library(
3901e04c3fSmrg  ['intel_common', genX_xml_h],
4001e04c3fSmrg  files_libintel_common,
4101e04c3fSmrg  include_directories : [inc_common, inc_intel],
4201e04c3fSmrg  c_args : [c_vis_args, no_override_init_args],
4301e04c3fSmrg  link_with : [libisl],
449f464c52Smaya  dependencies : [dep_expat, dep_libdrm, dep_thread, idep_genxml],
4501e04c3fSmrg)
469f464c52Smaya
479f464c52Smayainstall_intel_gpu_tests = get_option('install-intel-gpu-tests')
489f464c52Smaya
499f464c52Smayaif install_intel_gpu_tests
509f464c52Smaya  foreach g : [['70', 'gen7'], ['75', 'hsw'], ['80', 'gen8'],
519f464c52Smaya               ['90', 'gen9'], ['110', 'gen11']]
529f464c52Smaya    executable(
539f464c52Smaya      'intel_@0@_mi_builder_test'.format(g[1]),
549f464c52Smaya      files('tests/gen_mi_builder_test.cpp'),
559f464c52Smaya      cpp_args : [
569f464c52Smaya        cpp_vis_args, cpp_msvc_compat_args,
579f464c52Smaya        '-DGEN_VERSIONx10=@0@'.format(g[0])
589f464c52Smaya      ],
599f464c52Smaya      include_directories : [inc_common, inc_intel],
609f464c52Smaya      link_with : [libintel_dev, libmesa_util],
619f464c52Smaya      dependencies : [dep_libdrm, dep_thread, idep_gtest, idep_genxml],
629f464c52Smaya      install : install_intel_gpu_tests,
639f464c52Smaya    )
649f464c52Smaya  endforeach
659f464c52Smayaendif
66