mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This uses all the infrastructure we put together earlier to actually build and publish all the artifacts. We might still want to adjust what is built by default to control CI times. Signed-off-by: Austin Schuh <austin.linux@gmail.com> Co-authored-by: PJ Reiniger <pj.reiniger@gmail.com> Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
86 lines
2.5 KiB
Python
86 lines
2.5 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
|
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library", "wpilib_cc_static_library")
|
|
load("//shared/bazel/rules:packaging.bzl", "package_default_cc_project")
|
|
load("//shared/bazel/rules:publishing.bzl", "host_architectures")
|
|
|
|
wpilib_cc_library(
|
|
name = "halsim_xrp",
|
|
srcs = glob([
|
|
"src/main/native/cpp/*",
|
|
"src/main/native/include/**/*.hpp",
|
|
]),
|
|
include_license_files = True,
|
|
includes = ["src/main/native/include"],
|
|
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 = [
|
|
"//simulation/halsim_ws_core",
|
|
"//wpinet",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_library(
|
|
name = "halsim_xrp_static",
|
|
srcs = glob([
|
|
"src/main/native/cpp/*",
|
|
"src/main/native/include/**/*.hpp",
|
|
]),
|
|
copts = [
|
|
"-DHALSIM_InitExtension=HALSIM_InitExtension_XRP",
|
|
],
|
|
include_license_files = True,
|
|
includes = ["src/main/native/include"],
|
|
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 = [
|
|
"//simulation/halsim_ws_core",
|
|
"//wpinet",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_shared_library(
|
|
name = "shared/halsim_xrp",
|
|
auto_export_windows_symbols = False,
|
|
dynamic_deps = [
|
|
"//wpinet:shared/wpinet",
|
|
"//hal:shared/wpiHal",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":halsim_xrp",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_static_library(
|
|
name = "static/halsim_xrp",
|
|
static_deps = [
|
|
"//wpinet:static/wpinet",
|
|
"//hal:static/wpiHal",
|
|
"//simulation/halsim_ws_core:static/halsim_ws_core",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":halsim_xrp_static",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "DevMain-Cpp",
|
|
srcs = ["src/dev/native/cpp/main.cpp"],
|
|
)
|
|
|
|
package_default_cc_project(
|
|
name = "halsim_xrp",
|
|
architectures = host_architectures,
|
|
maven_artifact_name = "halsim_xrp",
|
|
maven_group_id = "org.wpilib.halsim",
|
|
)
|