Files
ortools-clone/ortools/graph/samples/code_samples.bzl
Laurent Perron 968a33a771 fix
2021-12-29 18:13:56 +01:00

33 lines
851 B
Python

"""Helper macro to compile and test code samples."""
def code_sample_cc(name):
native.cc_binary(
name = name,
srcs = [name + ".cc"],
deps = [
"//ortools/base",
"//ortools/graph:assignment",
"//ortools/graph:ebert_graph",
"//ortools/graph:linear_assignment",
"//ortools/graph:max_flow",
"//ortools/graph:min_cost_flow",
"//ortools/graph:shortestpaths",
],
)
native.cc_test(
name = name+"_test",
size = "small",
srcs = [name + ".cc"],
deps = [
":"+name,
"//ortools/base",
"//ortools/graph:assignment",
"//ortools/graph:ebert_graph",
"//ortools/graph:linear_assignment",
"//ortools/graph:max_flow",
"//ortools/graph:min_cost_flow",
"//ortools/graph:shortestpaths",
],
)