# Copyright 2023 The Dawn & Tint Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
#    contributors may be used to endorse or promote products derived from
#    this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

################################################################################
# File generated by 'tools/src/cmd/gen' using the template:
#   tools/src/cmd/gen/build/BUILD.gn.tmpl
#
# To regenerate run: './tools/run gen'
#
#                       Do not modify this file directly
################################################################################

import("../../../../../../scripts/dawn_overrides_with_defaults.gni")
import("../../../../../../scripts/tint_overrides_with_defaults.gni")

import("${tint_src_dir}/tint.gni")

if (tint_build_unittests || tint_build_benchmarks) {
  import("//testing/test.gni")
}
if (tint_build_wgsl_writer) {
  libtint_source_set("ast_printer") {
    sources = [
      "ast_printer.cc",
      "ast_printer.h",
    ]
    deps = [
      "${dawn_root}/src/utils:utils",
      "${tint_src_dir}/lang/core",
      "${tint_src_dir}/lang/core/constant",
      "${tint_src_dir}/lang/core/type",
      "${tint_src_dir}/lang/wgsl",
      "${tint_src_dir}/lang/wgsl/ast",
      "${tint_src_dir}/lang/wgsl/features",
      "${tint_src_dir}/lang/wgsl/program",
      "${tint_src_dir}/lang/wgsl/sem",
      "${tint_src_dir}/utils/containers",
      "${tint_src_dir}/utils/diagnostic",
      "${tint_src_dir}/utils/generator",
      "${tint_src_dir}/utils/ice",
      "${tint_src_dir}/utils/id",
      "${tint_src_dir}/utils/macros",
      "${tint_src_dir}/utils/math",
      "${tint_src_dir}/utils/memory",
      "${tint_src_dir}/utils/reflection",
      "${tint_src_dir}/utils/result",
      "${tint_src_dir}/utils/rtti",
      "${tint_src_dir}/utils/strconv",
      "${tint_src_dir}/utils/symbol",
      "${tint_src_dir}/utils/text",
      "${tint_src_dir}/utils/traits",
    ]
  }
}
if (tint_build_unittests) {
  if (tint_build_wgsl_writer) {
    tint_unittests_source_set("unittests") {
      sources = [
        "alias_type_test.cc",
        "array_accessor_test.cc",
        "assign_test.cc",
        "ast_printer_test.cc",
        "binary_test.cc",
        "bitcast_test.cc",
        "block_test.cc",
        "break_test.cc",
        "call_test.cc",
        "case_test.cc",
        "cast_test.cc",
        "const_assert_test.cc",
        "constructor_test.cc",
        "continue_test.cc",
        "diagnostic_test.cc",
        "discard_test.cc",
        "enable_test.cc",
        "function_test.cc",
        "global_decl_test.cc",
        "helper_test.h",
        "identifier_test.cc",
        "if_test.cc",
        "literal_test.cc",
        "loop_test.cc",
        "member_accessor_test.cc",
        "requires_test.cc",
        "return_test.cc",
        "switch_test.cc",
        "type_test.cc",
        "unary_op_test.cc",
        "variable_decl_statement_test.cc",
        "variable_test.cc",
      ]
      deps = [
        "${dawn_root}/src/utils:utils",
        "${tint_src_dir}:gmock_and_gtest",
        "${tint_src_dir}/api/common",
        "${tint_src_dir}/lang/core",
        "${tint_src_dir}/lang/core/constant",
        "${tint_src_dir}/lang/core/type",
        "${tint_src_dir}/lang/wgsl",
        "${tint_src_dir}/lang/wgsl/ast",
        "${tint_src_dir}/lang/wgsl/common",
        "${tint_src_dir}/lang/wgsl/features",
        "${tint_src_dir}/lang/wgsl/program",
        "${tint_src_dir}/lang/wgsl/resolver",
        "${tint_src_dir}/lang/wgsl/sem",
        "${tint_src_dir}/utils/containers",
        "${tint_src_dir}/utils/diagnostic",
        "${tint_src_dir}/utils/generator",
        "${tint_src_dir}/utils/ice",
        "${tint_src_dir}/utils/id",
        "${tint_src_dir}/utils/macros",
        "${tint_src_dir}/utils/math",
        "${tint_src_dir}/utils/memory",
        "${tint_src_dir}/utils/reflection",
        "${tint_src_dir}/utils/result",
        "${tint_src_dir}/utils/rtti",
        "${tint_src_dir}/utils/symbol",
        "${tint_src_dir}/utils/text",
        "${tint_src_dir}/utils/traits",
      ]

      if (tint_build_wgsl_writer) {
        deps += [ "${tint_src_dir}/lang/wgsl/writer/ast_printer" ]
      }
    }
  }
}
