blob: 2c3a9b88f2c9ce12edc96da49a5a5e675015af38 [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//cts/build/cts_element.gni")
import("//cts/build/cts_vars.gni")
# A source_set that can be used in CTS.
#
# An equivalent to the built-in source_set, but ensures dependencies are allowed
# in CTS.
#
# Example:
# ```
# cts_source_set("my-source-set") {
# sources = [
# "//cts/tests/my_test/my_lib.h",
# "//cts/tests/my_test/my_lib.cc",
# ]
# }
# ```
template("cts_source_set") {
if (defined(invoker.deps)) {
cts_element("unused") {
deps = invoker.deps
}
}
source_set(target_name) {
forward_variables_from(invoker, "*")
}
# Creates a file to enable other CTS targets to depend on this test package.
write_file("${root_gen_dir}/cts/${target_name}.${cts_extension}", "true")
}