# 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("tint_overrides_with_defaults.gni")

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

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