mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
38 lines
756 B
Text
38 lines
756 B
Text
# Bazel development build for C++ API.
|
|
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html
|
|
|
|
load("//bazel:ray.bzl", "COPTS")
|
|
|
|
cc_binary(
|
|
name = "example",
|
|
srcs = glob([
|
|
"*.cc",
|
|
]),
|
|
args = [
|
|
"--ray-dynamic-library-path $(location example.so)",
|
|
],
|
|
copts = COPTS,
|
|
data = [
|
|
"example.so",
|
|
"//cpp:ray_cpp_pkg",
|
|
],
|
|
linkstatic = True,
|
|
deps = [
|
|
"//cpp:ray_api",
|
|
"@com_github_gflags_gflags//:gflags",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "example.so",
|
|
srcs = glob([
|
|
"*.cc",
|
|
]),
|
|
copts = COPTS,
|
|
linkopts = ["-shared"],
|
|
linkstatic = True,
|
|
deps = [
|
|
"//cpp:ray_api",
|
|
"@com_github_gflags_gflags//:gflags",
|
|
],
|
|
)
|