blob: cf3527e5ad9d7c192a6fcfd3ac6425f8a63c6d41 [file] [log] [blame]
"""End-to-end test of forward declarations."""
load("@rules_rust//rust:defs.bzl", "rust_test")
licenses(["notice"])
cc_library(
name = "definition",
srcs = ["definition.cc"],
hdrs = ["definition.h"],
)
cc_library(
name = "declaration_1",
hdrs = ["declaration_1.h"],
deps = [
":definition", # build_cleaner: keep
],
)
cc_library(
name = "declaration_2",
hdrs = ["declaration_2.h"],
deps = [
":definition", # build_cleaner: keep
],
)
cc_library(
name = "no_definition_in_headers",
hdrs = ["no_definition_in_headers.h"],
)
rust_test(
name = "forward_declarations_test",
srcs = ["forward_declarations_test.rs"],
cc_deps = [
":declaration_1",
":declaration_2",
":definition",
":no_definition_in_headers",
],
deps = [
"//rs_bindings_from_cc/support:ctor",
"//rs_bindings_from_cc/support:forward_declare",
],
)