From 1cd3c86e36d6769227ed26ee7f0f87cffdddafbb Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Mon, 19 May 2025 13:47:54 +0200 Subject: [PATCH] update internal doc --- ortools/constraint_solver/docs/CP.md | 7 ++++++- ortools/routing/docs/ROUTING.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ortools/constraint_solver/docs/CP.md b/ortools/constraint_solver/docs/CP.md index df4d86d0ba..2865706a0f 100644 --- a/ortools/constraint_solver/docs/CP.md +++ b/ortools/constraint_solver/docs/CP.md @@ -15,6 +15,9 @@ Java and .Net. Each language have different requirements for the code samples. #include #include +#include "absl/base/log_severity.h" +#include "absl/log/globals.h" +#include "ortools/base/init_google.h" #include "ortools/constraint_solver/constraint_solver.h" namespace operations_research { @@ -59,7 +62,9 @@ void SimpleCpProgram() { } // namespace operations_research -int main(int /*argc*/, char* /*argv*/[]) { +int main(int argc, char* argv[]) { + InitGoogle(argv[0], &argc, &argv, true); + absl::SetStderrThreshold(absl::LogSeverityAtLeast::kInfo); operations_research::SimpleCpProgram(); return EXIT_SUCCESS; } diff --git a/ortools/routing/docs/ROUTING.md b/ortools/routing/docs/ROUTING.md index 764a54d8f2..b8b23b2270 100644 --- a/ortools/routing/docs/ROUTING.md +++ b/ortools/routing/docs/ROUTING.md @@ -24,7 +24,10 @@ and .Net. Each language have different requirements for the code samples. #include #include +#include "absl/base/log_severity.h" +#include "absl/log/globals.h" #include "absl/log/log.h" +#include "ortools/base/init_google.h" #include "ortools/constraint_solver/constraint_solver.h" #include "ortools/routing/enums.pb.h" #include "ortools/routing/index_manager.h" @@ -83,7 +86,9 @@ void SimpleRoutingProgram() { } // namespace operations_research::routing -int main(int /*argc*/, char* /*argv*/[]) { +int main(int argc, char* argv[]) { + InitGoogle(argv[0], &argc, &argv, true); + absl::SetStderrThreshold(absl::LogSeverityAtLeast::kInfo); operations_research::routing::SimpleRoutingProgram(); return EXIT_SUCCESS; }