-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathboost.bzl
43 lines (33 loc) · 930 Bytes
/
boost.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
37
38
39
40
41
42
43
includes_pattern = "%s/include"
include_pattern1 = includes_pattern + "/boost/**/*.h"
include_pattern2 = includes_pattern + "/boost/**/*pp"
def includes_list( library_name ):
return [ includes_pattern % library_name ]
def hdr_list( library_name ):
return native.glob([
include_pattern1 % library_name,
include_pattern2 % library_name,
])
def boost_library( name, defines=None, includes=None, hdrs=None, srcs=None, deps=None, copts=None ):
if defines == None:
defines = []
if includes == None:
includes = []
if hdrs == None:
hdrs = []
if srcs == None:
srcs = []
if deps == None:
deps = []
if copts == None:
copts = []
return native.cc_library(
name = name,
visibility = ["//visibility:public"],
defines = defines,
includes = includes_list(name) + includes,
hdrs = hdr_list(name) + hdrs,
srcs = [] + srcs,
deps = deps,
copts = copts,
)