Files
ortools-clone/ortools/glpk/BUILD.bazel
2025-09-29 17:21:58 +02:00

78 lines
2.2 KiB
Python

# Copyright 2010-2025 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")
package(
# Code specific to Glpk solver used by linear_solver/ and math_opt/.
default_visibility = ["//visibility:public"],
)
cc_library(
name = "glpk_env_deleter",
srcs = ["glpk_env_deleter.cc"],
hdrs = ["glpk_env_deleter.h"],
target_compatible_with =
select({
"//ortools/linear_solver:use_glpk": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
"//ortools/base:logging",
"@glpk",
],
)
cc_library(
name = "glpk_formatters",
srcs = ["glpk_formatters.cc"],
hdrs = ["glpk_formatters.h"],
target_compatible_with =
select({
"//ortools/linear_solver:use_glpk": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
"//ortools/base:logging",
"@abseil-cpp//absl/strings",
"@glpk",
],
)
cc_test(
name = "glpk_formatters_test",
srcs = ["glpk_formatters_test.cc"],
target_compatible_with =
select({
"//ortools/linear_solver:use_glpk": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
":glpk_formatters",
"//ortools/base:gmock_main",
"@abseil-cpp//absl/strings",
],
)
cc_library(
name = "glpk_computational_form",
hdrs = ["glpk_computational_form.h"],
target_compatible_with =
select({
"//ortools/linear_solver:use_glpk": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = ["@glpk"],
)