Skip to content

Commit 0f98559

Browse files
gchateletMizux
authored andcommitted
[bazel] Update various bazel files, remove useless files (#4885)
1 parent 2a36fb0 commit 0f98559

File tree

8 files changed

+77
-935
lines changed

8 files changed

+77
-935
lines changed

examples/cpp/BUILD.bazel

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ cc_binary(
4747
run_binary_test(
4848
name = "binpacking_2d_sat_class01_instance2_test",
4949
size = "medium",
50-
args = ["--input $(rootpath //ortools/packing/testdata:Class_01.2bp) --instance 2"],
50+
args = [
51+
"--input $(rootpath //ortools/packing/testdata:Class_01.2bp)",
52+
"--instance 2",
53+
],
5154
binary = ":binpacking_2d_sat",
5255
data = ["//ortools/packing/testdata:Class_01.2bp"],
5356
)
@@ -91,21 +94,33 @@ cc_binary(
9194
run_binary_test(
9295
name = "costas_array_sat_model1_test",
9396
size = "medium",
94-
args = ["--minsize=6 --maxsize=6 --model=1"],
97+
args = [
98+
"--minsize=6",
99+
"--maxsize=6",
100+
"--model=1",
101+
],
95102
binary = ":costas_array_sat",
96103
)
97104

98105
run_binary_test(
99106
name = "costas_array_sat_model2_test",
100107
size = "medium",
101-
args = ["--minsize=6 --maxsize=6 --model=2"],
108+
args = [
109+
"--minsize=6",
110+
"--maxsize=6",
111+
"--model=2",
112+
],
102113
binary = ":costas_array_sat",
103114
)
104115

105116
run_binary_test(
106117
name = "costas_array_sat_model3_test",
107118
size = "medium",
108-
args = ["--minsize=6 --maxsize=6 --model=3"],
119+
args = [
120+
"--minsize=6",
121+
"--maxsize=6",
122+
"--model=3",
123+
],
109124
binary = ":costas_array_sat",
110125
)
111126

@@ -191,7 +206,10 @@ cc_binary(
191206
run_binary_test(
192207
name = "knapsack_2d_sat_class01_instance2_test",
193208
size = "medium",
194-
args = ["--input $(rootpath //ortools/packing/testdata:Class_01.2bp) --instance 2"],
209+
args = [
210+
"--input $(rootpath //ortools/packing/testdata:Class_01.2bp)",
211+
"--instance 2",
212+
],
195213
binary = ":knapsack_2d_sat",
196214
data = ["//ortools/packing/testdata:Class_01.2bp"],
197215
)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2010-2025 Google LLC
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
15+
load("@rules_python//python:py_binary.bzl", "py_binary")
16+
load("//bazel:run_binary_test.bzl", "run_binary_test")
17+
18+
package(default_visibility = ["//visibility:public"])
19+
20+
cc_binary(
21+
name = "set_cover_cc",
22+
srcs = ["set_cover.cc"],
23+
deps = [
24+
"//ortools/base",
25+
"//ortools/set_cover:set_cover_heuristics",
26+
"//ortools/set_cover:set_cover_invariant",
27+
"//ortools/set_cover:set_cover_model",
28+
"@abseil-cpp//absl/base:log_severity",
29+
"@abseil-cpp//absl/log",
30+
"@abseil-cpp//absl/log:globals",
31+
],
32+
)
33+
34+
run_binary_test(
35+
name = "set_cover_cc_test",
36+
size = "small",
37+
binary = ":set_cover_cc",
38+
)
39+
40+
py_binary(
41+
name = "set_cover_py3",
42+
srcs = ["set_cover.py"],
43+
main = "set_cover.py",
44+
deps = [
45+
"//ortools/set_cover:set_cover_py_pb2",
46+
"//ortools/set_cover/python:set_cover",
47+
],
48+
)
49+
50+
run_binary_test(
51+
name = "set_cover_py_test",
52+
size = "small",
53+
binary = ":set_cover_py3",
54+
)

0 commit comments

Comments
 (0)