add logging to integer/linear_programming; keep absl log symbols in libortools, enable GLPK in bazel
This commit is contained in:
@@ -92,6 +92,7 @@ void RunAllExamples() {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
InitGoogle(argv[0], &argc, &argv, true);
|
||||
absl::SetFlag(&FLAGS_stderrthreshold, 0);
|
||||
operations_research::RunAllExamples();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ void RunAllExamples() {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
InitGoogle(argv[0], &argc, &argv, true);
|
||||
absl::SetFlag(&FLAGS_stderrthreshold, 0);
|
||||
operations_research::RunAllExamples();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ target_include_directories(${NAME} PRIVATE
|
||||
target_link_libraries(${NAME} PRIVATE
|
||||
ZLIB::ZLIB
|
||||
absl::base
|
||||
absl::log
|
||||
absl::log_flags
|
||||
absl::log_initialize
|
||||
absl::strings
|
||||
absl::str_format
|
||||
protobuf::libprotobuf
|
||||
|
||||
@@ -36,4 +36,8 @@ void FixFlagsAndEnvironmentForSwig() {
|
||||
absl::EnableLogPrefix(false);
|
||||
}
|
||||
|
||||
void KeepAbslSymbols() {
|
||||
absl::SetFlag(&FLAGS_stderrthreshold, 0);
|
||||
}
|
||||
|
||||
} // namespace operations_research
|
||||
|
||||
@@ -113,7 +113,10 @@ cc_library(
|
||||
"-DUSE_PDLP",
|
||||
"-DUSE_SCIP",
|
||||
"-DUSE_HIGHS",
|
||||
],
|
||||
] + select({
|
||||
":with_glpk": ["-DUSE_GLPK"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
":linear_solver_cc_proto",
|
||||
":scip_with_glop",
|
||||
@@ -150,7 +153,8 @@ cc_library(
|
||||
"//ortools/util:fp_utils",
|
||||
"//ortools/util:lazy_mutable_copy",
|
||||
] + select({
|
||||
":with_glpk": ["@glpk//:glpk"],
|
||||
":with_glpk": ["@glpk//:glpk",
|
||||
"//ortools/glpk:glpk_env_deleter"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user