From 91e63a7d412024c86b8243baaac5b91b30bf03db Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Mon, 1 Dec 2025 13:47:58 +0100 Subject: [PATCH] scip: Fix 10.0.0 support --- ortools/linear_solver/proto_solver/scip_proto_solver.cc | 6 ++++++ ortools/math_opt/solvers/gscip/gscip.cc | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ortools/linear_solver/proto_solver/scip_proto_solver.cc b/ortools/linear_solver/proto_solver/scip_proto_solver.cc index f40a10d474..d96d74755d 100644 --- a/ortools/linear_solver/proto_solver/scip_proto_solver.cc +++ b/ortools/linear_solver/proto_solver/scip_proto_solver.cc @@ -50,7 +50,13 @@ #include "scip/cons_indicator.h" #include "scip/cons_linear.h" #include "scip/cons_or.h" +#if SCIP_VERSION_MAJOR >= 10 +#include "scip/cons_nonlinear.h" +#define SCIPcreateConsBasicQuadratic SCIPcreateConsBasicQuadraticNonlinear +#define SCIPcreateConsQuadratic SCIPcreateConsQuadraticNonlinear +#else #include "scip/cons_quadratic.h" +#endif // SCIP_VERSION_MAJOR >= 10 #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "scip/def.h" diff --git a/ortools/math_opt/solvers/gscip/gscip.cc b/ortools/math_opt/solvers/gscip/gscip.cc index 872043d23a..7bcac209d5 100644 --- a/ortools/math_opt/solvers/gscip/gscip.cc +++ b/ortools/math_opt/solvers/gscip/gscip.cc @@ -47,7 +47,12 @@ #include "scip/cons_indicator.h" #include "scip/cons_linear.h" #include "scip/cons_or.h" +#if SCIP_VERSION_MAJOR >= 10 +#include "scip/cons_nonlinear.h" +#define SCIPcreateConsQuadratic SCIPcreateConsQuadraticNonlinear +#else #include "scip/cons_quadratic.h" +#endif // SCIP_VERSION_MAJOR >= 10 #include "scip/cons_sos1.h" #include "scip/cons_sos2.h" #include "scip/def.h"