cmake: Fixup for pdlp
This commit is contained in:
@@ -19,6 +19,15 @@ list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
|
||||
"USE_BOP" # enable BOP support
|
||||
"USE_GLOP" # enable GLOP support
|
||||
)
|
||||
if(USE_COINOR)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
|
||||
"USE_CBC" # enable COIN-OR CBC support
|
||||
"USE_CLP" # enable COIN-OR CLP support
|
||||
)
|
||||
endif()
|
||||
if(USE_GLPK)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_GLPK")
|
||||
endif()
|
||||
if(USE_PDLP)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_PDLP")
|
||||
set(PDLP_DIR pdlp)
|
||||
@@ -27,15 +36,6 @@ if(USE_SCIP)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_SCIP")
|
||||
set(GSCIP_DIR gscip)
|
||||
endif()
|
||||
if(USE_GLPK)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_GLPK")
|
||||
endif()
|
||||
if(USE_COINOR)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
|
||||
"USE_CBC" # enable COIN-OR CBC support
|
||||
"USE_CLP" # enable COIN-OR CLP support
|
||||
)
|
||||
endif()
|
||||
if(USE_CPLEX)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_CPLEX")
|
||||
endif()
|
||||
|
||||
@@ -77,6 +77,9 @@ endif()
|
||||
if(USE_GLPK)
|
||||
list(APPEND FLAGS "-DUSE_GLPK")
|
||||
endif()
|
||||
if(USE_PDLP)
|
||||
list(APPEND FLAGS "-DUSE_PDLP")
|
||||
endif()
|
||||
if(USE_SCIP)
|
||||
list(APPEND FLAGS "-DUSE_SCIP")
|
||||
endif()
|
||||
@@ -100,6 +103,10 @@ file(GLOB_RECURSE proto_dotnet_files RELATIVE ${PROJECT_SOURCE_DIR}
|
||||
"ortools/sat/*.proto"
|
||||
"ortools/util/*.proto"
|
||||
)
|
||||
if(USE_PDLP)
|
||||
file(GLOB_RECURSE pdlp_proto_dotnet_files RELATIVE ${PROJECT_SOURCE_DIR} "ortools/pdlp/*.proto")
|
||||
list(APPEND proto_dotnet_files ${pdlp_proto_dotnet_files})
|
||||
endif()
|
||||
list(REMOVE_ITEM proto_dotnet_files "ortools/constraint_solver/demon_profiler.proto")
|
||||
list(REMOVE_ITEM proto_dotnet_files "ortools/constraint_solver/assignment.proto")
|
||||
foreach(PROTO_FILE IN LISTS proto_dotnet_files)
|
||||
|
||||
@@ -72,6 +72,9 @@ endif()
|
||||
if(USE_GLPK)
|
||||
list(APPEND FLAGS "-DUSE_GLPK")
|
||||
endif()
|
||||
if(USE_PDLP)
|
||||
list(APPEND FLAGS "-DUSE_PDLP")
|
||||
endif()
|
||||
if(USE_SCIP)
|
||||
list(APPEND FLAGS "-DUSE_SCIP")
|
||||
endif()
|
||||
@@ -85,6 +88,10 @@ file(GLOB_RECURSE proto_java_files RELATIVE ${PROJECT_SOURCE_DIR}
|
||||
"ortools/sat/*.proto"
|
||||
"ortools/util/*.proto"
|
||||
)
|
||||
if(USE_PDLP)
|
||||
file(GLOB_RECURSE pdlp_proto_java_files RELATIVE ${PROJECT_SOURCE_DIR} "ortools/pdlp/*.proto")
|
||||
list(APPEND proto_java_files ${pdlp_proto_java_files})
|
||||
endif()
|
||||
list(REMOVE_ITEM proto_java_files "ortools/constraint_solver/demon_profiler.proto")
|
||||
list(REMOVE_ITEM proto_java_files "ortools/constraint_solver/assignment.proto")
|
||||
foreach(PROTO_FILE IN LISTS proto_java_files)
|
||||
|
||||
@@ -124,6 +124,10 @@ file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR}
|
||||
"ortools/util/*.proto"
|
||||
"ortools/scheduling/*.proto"
|
||||
)
|
||||
if(USE_PDLP)
|
||||
file(GLOB_RECURSE pdlp_proto_py_files RELATIVE ${PROJECT_SOURCE_DIR} "ortools/pdlp/*.proto")
|
||||
list(APPEND proto_py_files ${pdlp_proto_py_files})
|
||||
endif()
|
||||
list(REMOVE_ITEM proto_py_files "ortools/constraint_solver/demon_profiler.proto")
|
||||
foreach(PROTO_FILE IN LISTS proto_py_files)
|
||||
#message(STATUS "protoc proto(py): ${PROTO_FILE}")
|
||||
@@ -155,6 +159,9 @@ endif()
|
||||
if(USE_GLPK)
|
||||
list(APPEND FLAGS "-DUSE_GLPK")
|
||||
endif()
|
||||
if(USE_PDLP)
|
||||
list(APPEND FLAGS "-DUSE_PDLP")
|
||||
endif()
|
||||
if(USE_SCIP)
|
||||
list(APPEND FLAGS "-DUSE_SCIP")
|
||||
endif()
|
||||
@@ -183,6 +190,7 @@ file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/linear_solver/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/model_builder/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/model_builder/python/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/packing/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/pdlp/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/sat/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/sat/python/__init__.py CONTENT "")
|
||||
file(GENERATE OUTPUT ${PYTHON_PROJECT_DIR}/scheduling/__init__.py CONTENT "")
|
||||
|
||||
@@ -88,6 +88,7 @@ CONVERT_VECTOR(operations_research::MPVariable, MPVariable)
|
||||
%unignore operations_research::MPSolver::CLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::PDLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING;
|
||||
|
||||
@@ -301,6 +301,7 @@ PROTO2_RETURN(
|
||||
%unignore operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::CLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::PDLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING;
|
||||
|
||||
@@ -266,6 +266,7 @@ PY_CONVERT(MPVariable);
|
||||
%unignore operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::CLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::PDLP_LINEAR_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING;
|
||||
%unignore operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING;
|
||||
|
||||
@@ -56,6 +56,7 @@ setup(
|
||||
'@PROJECT_NAME@.linear_solver':['$<TARGET_FILE_NAME:pywraplp>', '*.pyi'],
|
||||
'@PROJECT_NAME@.model_builder.python':['$<TARGET_FILE_NAME:pywrap_model_builder_helper>', '*.pyi'],
|
||||
'@PROJECT_NAME@.packing':['*.pyi'],
|
||||
'@PROJECT_NAME@.pdlp':['*.pyi'],
|
||||
'@PROJECT_NAME@.sat.python':['$<TARGET_FILE_NAME:swig_helper>', '*.pyi'],
|
||||
'@PROJECT_NAME@.scheduling':['$<TARGET_FILE_NAME:pywraprcpsp>', '*.pyi'],
|
||||
'@PROJECT_NAME@.util.python':['$<TARGET_FILE_NAME:sorted_interval_list>', '*.pyi'],
|
||||
|
||||
Reference in New Issue
Block a user