bazel: cleanup from main

This commit is contained in:
Corentin Le Molgat
2025-09-22 17:28:02 +02:00
parent b05315de21
commit 149121a5ff
16 changed files with 45 additions and 86 deletions

View File

@@ -25,7 +25,5 @@ java_wrap_cc(
"//ortools/util/java:vector.swig",
],
visibility = ["//visibility:public"],
deps = [
"//ortools/algorithms:knapsack_solver_lib",
],
deps = ["//ortools/algorithms:knapsack_solver_lib"],
)

View File

@@ -18,9 +18,7 @@ package(default_visibility = ["//visibility:public"])
filegroup(
name = "base_swig",
srcs = [
"base.i",
],
srcs = ["base.i"],
visibility = ["//visibility:public"],
)
@@ -35,25 +33,19 @@ cc_library(
"adjustable_priority_queue.h",
"adjustable_priority_queue-inl.h",
],
deps = [
":base",
],
deps = [":base"],
)
cc_library(
name = "array",
srcs = ["array_internal.h"],
hdrs = ["array.h"],
deps = [
"@abseil-cpp//absl/utility",
],
deps = ["@abseil-cpp//absl/utility"],
)
cc_library(
name = "base",
srcs = [
"version.cc",
],
srcs = ["version.cc"],
hdrs = [
"commandlineflags.h",
"init_google.h",
@@ -109,9 +101,7 @@ cc_library(
cc_library(
name = "commandlineflags",
srcs = [
"commandlineflags.cc",
],
srcs = ["commandlineflags.cc"],
hdrs = ["commandlineflags.h"],
deps = [
"@abseil-cpp//absl/flags:flag",
@@ -191,9 +181,7 @@ cc_library(
cc_library(
name = "flags",
hdrs = ["flags.h"],
deps = [
"@abseil-cpp//absl/flags:flag",
],
deps = ["@abseil-cpp//absl/flags:flag"],
)
cc_library(
@@ -222,6 +210,7 @@ cc_library(
cc_library(
name = "gmock",
testonly = True,
hdrs = ["gmock.h"],
deps = [
":protocol-buffer-matchers",
@@ -232,6 +221,7 @@ cc_library(
cc_library(
name = "gmock_main",
testonly = True,
deps = [
":gmock",
"@googletest//:gtest_main",
@@ -342,9 +332,7 @@ cc_library(
name = "mathutil",
srcs = ["mathutil.cc"],
hdrs = ["mathutil.h"],
deps = [
":base",
],
deps = [":base"],
)
cc_library(
@@ -355,9 +343,7 @@ cc_library(
cc_library(
name = "memutil",
hdrs = ["memutil.h"],
deps = [
"@abseil-cpp//absl/strings",
],
deps = ["@abseil-cpp//absl/strings"],
)
cc_library(
@@ -397,6 +383,7 @@ cc_library(
cc_library(
name = "parse_test_proto",
testonly = True,
hdrs = ["parse_test_proto.h"],
deps = [
":gmock",
@@ -571,9 +558,7 @@ cc_library(
name = "sysinfo",
srcs = ["sysinfo.cc"],
hdrs = ["sysinfo.h"],
deps = [
"@abseil-cpp//absl/strings",
],
deps = ["@abseil-cpp//absl/strings"],
)
cc_library(

View File

@@ -208,9 +208,7 @@ cc_library(
srcs = ["status.cc"],
hdrs = ["status.h"],
copts = SAFE_FP_CODE,
deps = [
"//ortools/base",
],
deps = ["//ortools/base"],
)
# Glop parameters.

View File

@@ -55,7 +55,5 @@ cc_library(
"//ortools/linear_solver:use_glpk": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
"@glpk",
],
deps = ["@glpk"],
)

View File

@@ -22,9 +22,7 @@ java_wrap_cc(
srcs = ["graph.swig"],
module = "graph",
package = "com.google.ortools.graph",
swig_includes = [
"//ortools/base:base_swig",
],
swig_includes = ["//ortools/base:base_swig"],
visibility = ["//visibility:public"],
deps = [
"//ortools/graph:assignment",

View File

@@ -24,25 +24,19 @@ pybind_extension(
name = "linear_sum_assignment",
srcs = ["linear_sum_assignment.cc"],
visibility = ["//visibility:public"],
deps = [
"//ortools/graph:assignment",
],
deps = ["//ortools/graph:assignment"],
)
pybind_extension(
name = "max_flow",
srcs = ["max_flow.cc"],
visibility = ["//visibility:public"],
deps = [
"//ortools/graph:max_flow",
],
deps = ["//ortools/graph:max_flow"],
)
pybind_extension(
name = "min_cost_flow",
srcs = ["min_cost_flow.cc"],
visibility = ["//visibility:public"],
deps = [
"//ortools/graph:min_cost_flow",
],
deps = ["//ortools/graph:min_cost_flow"],
)

View File

@@ -25,7 +25,5 @@ java_wrap_cc(
"//ortools/util/java:absl_string_view.swig",
],
visibility = ["//visibility:public"],
deps = [
"//ortools/init",
],
deps = ["//ortools/init"],
)

View File

@@ -78,7 +78,5 @@ java_library(
"@platforms//os:osx": ["//ortools/java/com/google/ortools:libjniortools.dylib"],
"@platforms//os:windows": ["//ortools/java/com/google/ortools:jniortools.dll"],
}),
deps = [
"@maven//:net_java_dev_jna_jna",
],
deps = ["@maven//:net_java_dev_jna_jna"],
)

View File

@@ -27,9 +27,7 @@ java_wrap_cc(
"//ortools/util/java:vector.swig",
],
visibility = ["//visibility:public"],
deps = [
"//ortools/linear_solver/wrappers:model_builder_helper",
],
deps = ["//ortools/linear_solver/wrappers:model_builder_helper"],
)
java_junit5_test(

View File

@@ -13,7 +13,11 @@
load("@rules_cc//cc:cc_library.bzl", "cc_library")
package(default_visibility = ["//visibility:public"])
package(
default_visibility = [
"//visibility:public",
],
)
# Floating-point code in this directory must not be compiled with
# dangerous optimizations. For example do not assume that FP expressions

View File

@@ -37,9 +37,7 @@ cc_library(
cc_library(
name = "arc_flow_solver",
srcs = [
"arc_flow_solver.cc",
],
srcs = ["arc_flow_solver.cc"],
hdrs = ["arc_flow_solver.h"],
deps = [
":arc_flow_builder",
@@ -80,9 +78,7 @@ cc_library(
cc_binary(
name = "vector_bin_packing",
srcs = [
"vector_bin_packing_main.cc",
],
srcs = ["vector_bin_packing_main.cc"],
deps = [
"//ortools/base",
"//ortools/base:file",
@@ -99,9 +95,7 @@ cc_binary(
cc_test(
name = "vector_bin_packing_test",
size = "medium",
srcs = [
"vector_bin_packing_main.cc",
],
srcs = ["vector_bin_packing_main.cc"],
args = ["--input $(rootpath //ortools/packing/testdata:1D__bpp_scholl__bin2data.N2W2B1R0.vbp)"],
data = ["//ortools/packing/testdata:1D__bpp_scholl__bin2data.N2W2B1R0.vbp"],
deps = [

View File

@@ -35,6 +35,7 @@ cc_library(
cc_test(
name = "scheduler_test",
srcs = ["scheduler_test.cc"],
tags = ["manual"],
deps = [
":scheduler",
":solvers_cc_proto",
@@ -97,6 +98,7 @@ cc_library(
cc_test(
name = "iteration_stats_test",
srcs = ["iteration_stats_test.cc"],
tags = ["manual"],
deps = [
":iteration_stats",
":quadratic_program",
@@ -151,7 +153,7 @@ cc_test(
name = "primal_dual_hybrid_gradient_test",
size = "medium",
srcs = ["primal_dual_hybrid_gradient_test.cc"],
shard_count = 3,
tags = ["manual"],
deps = [
":iteration_stats",
":primal_dual_hybrid_gradient",
@@ -250,6 +252,7 @@ cc_test(
name = "sharded_optimization_utils_test",
size = "small",
srcs = ["sharded_optimization_utils_test.cc"],
tags = ["manual"],
deps = [
":quadratic_program",
":sharded_optimization_utils",
@@ -282,6 +285,7 @@ cc_library(
cc_test(
name = "sharded_quadratic_program_test",
srcs = ["sharded_quadratic_program_test.cc"],
tags = ["manual"],
deps = [
":quadratic_program",
":sharded_quadratic_program",
@@ -314,6 +318,7 @@ cc_test(
name = "sharder_test",
size = "small",
srcs = ["sharder_test.cc"],
tags = ["manual"],
deps = [
":scheduler",
":sharder",
@@ -420,6 +425,7 @@ cc_library(
cc_test(
name = "trust_region_test",
srcs = ["trust_region_test.cc"],
tags = ["manual"],
deps = [
":quadratic_program",
":sharded_optimization_utils",

View File

@@ -21,9 +21,7 @@ package(default_visibility = ["//visibility:public"])
proto_library(
name = "jobshop_scheduling_proto",
srcs = ["jobshop_scheduling.proto"],
deps = [
"@protobuf//:wrappers_proto",
],
deps = ["@protobuf//:wrappers_proto"],
)
cc_proto_library(

View File

@@ -32,9 +32,7 @@ pybind_extension(
py_test(
name = "rcpsp_test",
srcs = ["rcpsp_test.py"],
data = [
"//ortools/scheduling/testdata:j301_1.sm",
],
data = ["//ortools/scheduling/testdata:j301_1.sm"],
deps = [
":rcpsp",
"//ortools/scheduling:rcpsp_py_proto",

View File

@@ -232,6 +232,7 @@ cc_test(
size = "medium",
timeout = "eternal",
srcs = ["set_cover_test.cc"],
tags = ["manual"],
deps = [
":base_types",
":set_cover_cc_proto",
@@ -262,6 +263,7 @@ cc_proto_library(
py_proto_library(
name = "capacity_py_pb2",
visibility = ["//visibility:public"],
deps = [":capacity_proto"],
)

View File

@@ -31,12 +31,8 @@ cc_library(
cc_library(
name = "gurobi_environment",
srcs = [
"gurobi_environment.cc",
],
hdrs = [
"gurobi_environment.h",
],
srcs = ["gurobi_environment.cc"],
hdrs = ["gurobi_environment.h"],
deps = [
":dynamic_library",
"//ortools/base",
@@ -53,12 +49,8 @@ cc_library(
cc_library(
name = "xpress_environment",
srcs = [
"xpress_environment.cc",
],
hdrs = [
"xpress_environment.h",
],
srcs = ["xpress_environment.cc"],
hdrs = ["xpress_environment.h"],
deps = [
":dynamic_library",
"//ortools/base",