mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
|
|
|
cc_library(
|
|
name = "headers",
|
|
hdrs = glob(["src/main/native/include/**"]),
|
|
includes = ["src/main/native/include"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "halsim_ds_socket",
|
|
srcs = glob(["src/main/native/cpp/**"]),
|
|
target_compatible_with = select({
|
|
"@rules_bzlmodrio_toolchains//constraints/is_roborio:roborio": ["@platforms//:incompatible"],
|
|
"@rules_bzlmodrio_toolchains//constraints/is_systemcore:systemcore": ["@platforms//:incompatible"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":headers",
|
|
"//hal:wpiHal.static",
|
|
"//wpinet:wpinet.static",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "halsim_ds_socket-test",
|
|
size = "small",
|
|
srcs = glob([
|
|
"src/test/native/**/*.cpp",
|
|
"src/test/native/**/*.h",
|
|
]),
|
|
deps = [
|
|
"//simulation/halsim_ds_socket",
|
|
"//thirdparty/googletest:googletest.static",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "DevMain-Cpp",
|
|
srcs = ["src/dev/native/cpp/main.cpp"],
|
|
deps = [
|
|
":halsim_ds_socket",
|
|
],
|
|
)
|