-
Notifications
You must be signed in to change notification settings - Fork 35
/
BUILD
64 lines (59 loc) · 1.19 KB
/
BUILD
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package(default_visibility = ["//visibility:public"])
SOURCE_FILES_NO_MAIN = glob(
[
"src/**/*.cc",
"src/**/*.h",
"src/**/*.inl",
],
exclude = glob([
"src/**/*.test.cc",
"src/**/*.test.h",
"src/**/*.perf.cc",
"src/**/*.perf.h",
"src/**/*.pybind.cc",
"src/**/*.pybind.h",
"src/**/main.cc",
]),
)
TEST_FILES = glob(
[
"src/**/*.test.cc",
"src/**/*.test.h",
],
)
cc_binary(
name = "pymatching",
srcs = SOURCE_FILES_NO_MAIN + glob(["src/**/main.cc"]),
copts = [
"-std=c++20",
"-O3",
"-DNDEBUG",
],
includes = ["src/"],
deps = ["@stim//:stim_lib"],
)
cc_library(
name = "libpymatching",
srcs = SOURCE_FILES_NO_MAIN,
copts = [
"-std=c++20",
"-O3",
"-DNDEBUG",
],
includes = ["src/"],
deps = ["@stim//:stim_lib"],
)
cc_test(
name = "pymatching_test",
srcs = SOURCE_FILES_NO_MAIN + TEST_FILES,
copts = [
"-std=c++20",
],
data = glob(["testdata/**"]),
includes = ["src/"],
deps = [
"@gtest",
"@gtest//:gtest_main",
"@stim//:stim_lib",
],
)