forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bzl
36 lines (35 loc) · 1.21 KB
/
build.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def define_targets(rules):
rules.cc_library(
name = "caffe2_serialize",
srcs = [
"caffe2/serialize/file_adapter.cc",
"caffe2/serialize/inline_container.cc",
"caffe2/serialize/istream_adapter.cc",
"caffe2/serialize/read_adapter_interface.cc",
],
tags = [
"supermodule:android/default/pytorch",
"supermodule:ios/default/public.pytorch",
"-fbcode",
"xplat",
],
visibility = ["//visibility:public"],
deps = [
":caffe2_headers",
"@com_github_glog//:glog",
"//c10",
"//third_party/miniz-2.0.8:miniz",
],
)
rules.genrule(
name = "version_h",
srcs = [
":torch/csrc/api/include/torch/version.h.in",
":version.txt",
],
outs = ["torch/csrc/api/include/torch/version.h"],
cmd = "$(location //tools/setup_helpers:gen_version_header) " +
"--template-path $(location :torch/csrc/api/include/torch/version.h.in) " +
"--version-path $(location :version.txt) --output-path $@ ",
tools = ["//tools/setup_helpers:gen_version_header"],
)