Skip to content

Commit 3ed2b2d

Browse files
committed
Merge remote-tracking branch 'origin/mizux/rc' into stable
2 parents d37317b + 3c5c99c commit 3ed2b2d

2,222 files changed

Lines changed: 132647 additions & 28286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
common --noenable_bzlmod
2+
13
# ----CONFIG OPTIONS----
24
build --flag_alias=with_bop=//ortools/linear_solver:with_bop
35
build --flag_alias=with_cbc=//ortools/linear_solver:with_cbc
46
build --flag_alias=with_clp=//ortools/linear_solver:with_clp
7+
build --flag_alias=with_cp_sat=//ortools/linear_solver:with_cp_sat
58
build --flag_alias=with_glop=//ortools/linear_solver:with_glop
69
build --flag_alias=with_glpk=//ortools/linear_solver:with_glpk
710
build --flag_alias=with_highs=//ortools/linear_solver:with_highs
@@ -18,12 +21,17 @@ build --apple_platform_type=macos
1821
# platform.
1922
build --enable_platform_specific_config
2023

21-
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
22-
build:linux --host_cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
23-
build:macos --cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
24-
build:macos --host_cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
25-
build:windows --cxxopt="/std:c++20"
26-
build:windows --host_cxxopt="/std:c++20"
24+
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare
25+
build:macos --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --cxxopt=-mmacos-version-min=10.15 --features=-supports_dynamic_linker
26+
build:macos --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare --host_cxxopt=-mmacos-version-min=10.15
27+
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"
28+
29+
# Enable the runfiles symlink tree on Windows. This makes it possible to build
30+
# the pip package on Windows without an intermediate data-file archive, as the
31+
# build_pip_package script in its current form (as of Aug 2023) uses the
32+
# runfiles symlink tree to decide what to put into the Python wheel.
33+
startup --windows_enable_symlinks
34+
build:windows --enable_runfiles
2735

2836
# Print command lines for build commands.
2937
# build --subcommands=pretty_print

.cmake-format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2010-2022 Google LLC
1+
# Copyright 2010-2024 Google LLC
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

.github/workflows/amd64_cmake_glop_cpp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
docker:
7+
name: Docker • CMake • Glop
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v4

.github/workflows/amd64_docker_bazel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
bazel:
88
strategy:
99
matrix:
10-
distro: [alpine, archlinux, centos, debian, fedora, opensuse, ubuntu]
10+
distro: [archlinux, debian, fedora, opensuse, ubuntu]
1111
fail-fast: false
1212
name: ${{ matrix.distro }} • Bazel • C++
1313
runs-on: ubuntu-latest

.github/workflows/amd64_web.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ name: amd64 Web
44
on: [push, pull_request, workflow_dispatch]
55

66
jobs:
7-
Distros:
7+
emscripten:
8+
name: Linux • Emscripten
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v4

.github/workflows/amd64_windows_bazel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
native:
99
strategy:
1010
matrix:
11-
runner: [windows-2022, windows-2019]
11+
runner: [windows-2022]
1212
python: [
1313
{version: '3.9'},
1414
{version: '3.10'},

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ or-tools*.zip
2424
*.pbtxt
2525
*.ass
2626
*.swp
27+
*.swo
2728

2829
build*.log
2930
test.log

CMakeLists.txt

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2010-2022 Google LLC
1+
# Copyright 2010-2024 Google LLC
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at
@@ -84,23 +84,24 @@ else()
8484
endforeach()
8585
endif()
8686

87-
if(MSVC)
88-
if(NOT BUILD_SHARED_LIBS)
89-
# With CMake 3.27+ ZERO_CHECK target will create a cyclic dependencies error.
90-
set(CMAKE_SUPPRESS_REGENERATION TRUE)
91-
else()
92-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
93-
endif()
87+
if(MSVC AND BUILD_SHARED_LIBS)
88+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
9489
endif()
9590

9691
# Disable CTest targets
9792
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
9893
include(CTest)
9994

100-
# By default only build the C++ library.
95+
# By default only build the C++ library which agregate all components.
10196
option(BUILD_CXX "Build C++ library" ON)
10297
message(STATUS "Build C++ library: ${BUILD_CXX}")
10398

99+
# If we don't build ortools we could build the GLOP standalone project
100+
if(NOT BUILD_CXX)
101+
OPTION(BUILD_GLOP "Build GLOP standalone" ON)
102+
message(STATUS "Build standalone Glop: ${BUILD_GLOP}")
103+
endif()
104+
104105
option(BUILD_PYTHON "Build Python Library" OFF)
105106
message(STATUS "Build Python: ${BUILD_PYTHON}")
106107
option(BUILD_JAVA "Build Java Library" OFF)
@@ -128,9 +129,6 @@ message(STATUS "Build LP Parser: ${BUILD_LP_PARSER}")
128129
CMAKE_DEPENDENT_OPTION(BUILD_MATH_OPT "Build the MATH_OPT" ON "BUILD_CXX" OFF)
129130
message(STATUS "Build MathOpt: ${BUILD_MATH_OPT}")
130131

131-
CMAKE_DEPENDENT_OPTION(BUILD_GLOP "Build GLOP standalone" ON "NOT BUILD_CXX" OFF)
132-
message(STATUS "Build standalone Glop: ${BUILD_GLOP}")
133-
134132
## Samples
135133
option(BUILD_SAMPLES "Build samples" ON)
136134
message(STATUS "Build samples: ${BUILD_SAMPLES}")
@@ -184,7 +182,11 @@ CMAKE_DEPENDENT_OPTION(BUILD_Protobuf "Build the Protobuf dependency Library" OF
184182
"NOT BUILD_DEPS" ON)
185183
message(STATUS "Build protobuf: ${BUILD_Protobuf}")
186184

187-
if(BUILD_LP_PARSER)
185+
CMAKE_DEPENDENT_OPTION(BUILD_Eigen3 "Build the eigen3 dependency Library" OFF
186+
"NOT BUILD_DEPS" ON)
187+
message(STATUS "Build eigen3: ${BUILD_Eigen3}")
188+
189+
if(BUILD_LP_PARSER OR BUILD_TESTING)
188190
CMAKE_DEPENDENT_OPTION(BUILD_re2 "Build the re2 dependency Library" OFF
189191
"NOT BUILD_DEPS" ON)
190192
message(STATUS "Build re2: ${BUILD_re2}")
@@ -199,6 +201,11 @@ else()
199201
endif()
200202

201203
# Optional third party solvers (enabled by default)
204+
## BOP
205+
# note OFF is currently not supported.
206+
CMAKE_DEPENDENT_OPTION(USE_BOP "Use the BOP solver" ON "BUILD_CXX" OFF)
207+
message(STATUS "BOP support: ${USE_BOP}")
208+
202209
## COIN-OR Solvers (Cbc, Clp)
203210
CMAKE_DEPENDENT_OPTION(USE_COINOR "Use the COIN-OR solver" ON "BUILD_CXX" OFF)
204211
message(STATUS "COIN-OR support: ${USE_COINOR}")
@@ -224,8 +231,13 @@ if(USE_COINOR)
224231
message(STATUS "Build Cbc: ${BUILD_Cbc}")
225232
endif()
226233

234+
## GLOP
235+
# note OFF is currently not supported.
236+
CMAKE_DEPENDENT_OPTION(USE_GLOP "Use the GLOP solver" ON "BUILD_CXX" OFF)
237+
message(STATUS "GLOP support: ${USE_GLOP}")
238+
227239
## GLPK
228-
# Disable by default since it is GLPv3, user could enable it and release under GLPv3
240+
# Disable by default since it is GPLv3, user could enable it and release under GPLv3
229241
# see: https://www.apache.org/licenses/GPL-compatibility.html
230242
CMAKE_DEPENDENT_OPTION(USE_GLPK "Use the GLPK solver" OFF "BUILD_CXX" OFF)
231243
message(STATUS "GLPK support: ${USE_GLPK}")
@@ -238,6 +250,7 @@ endif()
238250
## GUROBI
239251
# Since it is dynamicaly loaded upon use, OFF is currently not supported.
240252
CMAKE_DEPENDENT_OPTION(USE_GUROBI "Use the Gurobi solver" ON "BUILD_CXX" OFF)
253+
message(STATUS "Gurobi support: ${USE_GUROBI}")
241254

242255
## HiGHS
243256
# see: https://github.com/ERGO-Code/HiGHS
@@ -256,11 +269,6 @@ if(USE_PDLP)
256269
CMAKE_DEPENDENT_OPTION(BUILD_PDLP "Build the PDLP dependency Library" ON
257270
"NOT BUILD_DEPS" ON)
258271
message(STATUS "Build PDLP: ${BUILD_PDLP}")
259-
if(BUILD_PDLP)
260-
CMAKE_DEPENDENT_OPTION(BUILD_Eigen3 "Build the eigen3 dependency Library" OFF
261-
"NOT BUILD_DEPS" ON)
262-
message(STATUS "Build eigen3: ${BUILD_Eigen3}")
263-
endif()
264272
endif()
265273

266274
## SCIP
@@ -279,8 +287,9 @@ option(USE_CPLEX "Use the CPLEX solver" OFF)
279287
message(STATUS "CPLEX support: ${USE_CPLEX}")
280288

281289
## XPRESS
282-
option(USE_XPRESS "Use the XPRESS solver" OFF)
283-
message(STATUS "XPRESS support: ${USE_XPRESS}")
290+
# Since it is dynamicaly loaded upon use, OFF is currently not supported.
291+
CMAKE_DEPENDENT_OPTION(USE_XPRESS "Use the Xpress solver" ON "BUILD_CXX" OFF)
292+
message(STATUS "Xpress support: ${USE_XPRESS}")
284293

285294
# Language specific options
286295
if(BUILD_CXX)
@@ -362,6 +371,10 @@ if(BUILD_PYTHON)
362371
"NOT BUILD_DEPS" ON)
363372
message(STATUS "Python: Build pybind11_protobuf: ${BUILD_pybind11_protobuf}")
364373

374+
CMAKE_DEPENDENT_OPTION(BUILD_pybind11_abseil "Build the pybind11_abseil dependency Library" OFF
375+
"NOT BUILD_DEPS" ON)
376+
message(STATUS "Python: Build pybind11_abseil: ${BUILD_pybind11_abseil}")
377+
365378
option(GENERATE_PYTHON_STUB "Generate Python stub file (.pyi)" ON)
366379
message(STATUS "Python: Generate stub file: ${GENERATE_PYTHON_STUB}")
367380

Dependencies.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
Protobuf=v25.0
2-
abseil-cpp=20230802.1
3-
Cbc=2.10.7
4-
Cgl=0.60.5
5-
Clp=1.17.7
6-
Osi=0.108.7
7-
CoinUtils=2.11.6
1+
abseil-cpp=20240116.1
2+
Protobuf=v25.3
83
Eigen=3.4.0
9-
Re2=2023-11-01
4+
Re2=2024-02-01
5+
CoinUtils=2.11.6
6+
Osi=0.108.7
7+
Clp=1.17.7
8+
Cgl=0.60.5
9+
Cbc=2.10.7
10+
GLPK=5.0
1011
HiGHS=v1.6.0
11-
Scip=v804
12+
Scip=v810
13+
# Python
14+
pybind11=v2.11.1
15+
pybind11_abseil=52f2739
16+
pybind11_protobuf=3b11990
17+
# Testing
18+
googletest=v1.14.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2010-2022 Google LLC
1+
# Copyright 2010-2024 Google LLC
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at

0 commit comments

Comments
 (0)