# Copyright 2018 The Dawn Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

group("fuzzers") {
  testonly = true
  deps = [
    "src/dawn/fuzzers",
    "src/tint/fuzzers",
  ]
}

group("all") {
  testonly = true
  deps = [
    ":fuzzers",
    "src/dawn/native:webgpu_dawn",
    "src/dawn/tests",
    "src/tint/api",
  ]
  if (tint_build_unittests) {
    deps += [ "src/tint/cmd/test" ]
  }
  if (dawn_standalone) {
    deps += [
      "src/dawn/samples",
      "src/tint/cmd/remote_compile",
      "src/tint/cmd/tint",
    ]
  }
}

# This target is built when no specific target is specified on the command line.
group("default") {
  testonly = true
  deps = [ ":all" ]
}
