add logging to integer/linear_programming; keep absl log symbols in libortools, enable GLPK in bazel

This commit is contained in:
Laurent Perron
2023-03-09 14:40:16 +01:00
parent 5d76455956
commit 241d6cd286
5 changed files with 15 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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

View File

@@ -36,4 +36,8 @@ void FixFlagsAndEnvironmentForSwig() {
absl::EnableLogPrefix(false);
}
void KeepAbslSymbols() {
absl::SetFlag(&FLAGS_stderrthreshold, 0);
}
} // namespace operations_research

View File

@@ -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": [],
}),
)