Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/mizux/rc' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Mar 7, 2024
2 parents d37317b + 3c5c99c commit 3ed2b2d
Show file tree
Hide file tree
Showing 2,222 changed files with 132,647 additions and 28,286 deletions.
20 changes: 14 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
common --noenable_bzlmod

# ----CONFIG OPTIONS----
build --flag_alias=with_bop=//ortools/linear_solver:with_bop
build --flag_alias=with_cbc=//ortools/linear_solver:with_cbc
build --flag_alias=with_clp=//ortools/linear_solver:with_clp
build --flag_alias=with_cp_sat=//ortools/linear_solver:with_cp_sat
build --flag_alias=with_glop=//ortools/linear_solver:with_glop
build --flag_alias=with_glpk=//ortools/linear_solver:with_glpk
build --flag_alias=with_highs=//ortools/linear_solver:with_highs
Expand All @@ -18,12 +21,17 @@ build --apple_platform_type=macos
# platform.
build --enable_platform_specific_config

build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:linux --host_cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:macos --cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
build:macos --host_cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
build:windows --cxxopt="/std:c++20"
build:windows --host_cxxopt="/std:c++20"
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare
build:macos --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --cxxopt=-mmacos-version-min=10.15 --features=-supports_dynamic_linker
build:macos --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare --host_cxxopt=-mmacos-version-min=10.15
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"

# Enable the runfiles symlink tree on Windows. This makes it possible to build
# the pip package on Windows without an intermediate data-file archive, as the
# build_pip_package script in its current form (as of Aug 2023) uses the
# runfiles symlink tree to decide what to put into the Python wheel.
startup --windows_enable_symlinks
build:windows --enable_runfiles

# Print command lines for build commands.
# build --subcommands=pretty_print
Expand Down
2 changes: 1 addition & 1 deletion .cmake-format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2022 Google LLC
# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amd64_cmake_glop_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request, workflow_dispatch]

jobs:
docker:
name: Docker • CMake • Glop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_docker_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
bazel:
strategy:
matrix:
distro: [alpine, archlinux, centos, debian, fedora, opensuse, ubuntu]
distro: [archlinux, debian, fedora, opensuse, ubuntu]
fail-fast: false
name: ${{ matrix.distro }} • Bazel • C++
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/amd64_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: amd64 Web
on: [push, pull_request, workflow_dispatch]

jobs:
Distros:
emscripten:
name: Linux • Emscripten
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/amd64_windows_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
native:
strategy:
matrix:
runner: [windows-2022, windows-2019]
runner: [windows-2022]
python: [
{version: '3.9'},
{version: '3.10'},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ or-tools*.zip
*.pbtxt
*.ass
*.swp
*.swo

build*.log
test.log
Expand Down
55 changes: 34 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2022 Google LLC
# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -84,23 +84,24 @@ else()
endforeach()
endif()

if(MSVC)
if(NOT BUILD_SHARED_LIBS)
# With CMake 3.27+ ZERO_CHECK target will create a cyclic dependencies error.
set(CMAKE_SUPPRESS_REGENERATION TRUE)
else()
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
if(MSVC AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

# Disable CTest targets
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
include(CTest)

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

# If we don't build ortools we could build the GLOP standalone project
if(NOT BUILD_CXX)
OPTION(BUILD_GLOP "Build GLOP standalone" ON)
message(STATUS "Build standalone Glop: ${BUILD_GLOP}")
endif()

option(BUILD_PYTHON "Build Python Library" OFF)
message(STATUS "Build Python: ${BUILD_PYTHON}")
option(BUILD_JAVA "Build Java Library" OFF)
Expand Down Expand Up @@ -128,9 +129,6 @@ message(STATUS "Build LP Parser: ${BUILD_LP_PARSER}")
CMAKE_DEPENDENT_OPTION(BUILD_MATH_OPT "Build the MATH_OPT" ON "BUILD_CXX" OFF)
message(STATUS "Build MathOpt: ${BUILD_MATH_OPT}")

CMAKE_DEPENDENT_OPTION(BUILD_GLOP "Build GLOP standalone" ON "NOT BUILD_CXX" OFF)
message(STATUS "Build standalone Glop: ${BUILD_GLOP}")

## Samples
option(BUILD_SAMPLES "Build samples" ON)
message(STATUS "Build samples: ${BUILD_SAMPLES}")
Expand Down Expand Up @@ -184,7 +182,11 @@ CMAKE_DEPENDENT_OPTION(BUILD_Protobuf "Build the Protobuf dependency Library" OF
"NOT BUILD_DEPS" ON)
message(STATUS "Build protobuf: ${BUILD_Protobuf}")

if(BUILD_LP_PARSER)
CMAKE_DEPENDENT_OPTION(BUILD_Eigen3 "Build the eigen3 dependency Library" OFF
"NOT BUILD_DEPS" ON)
message(STATUS "Build eigen3: ${BUILD_Eigen3}")

if(BUILD_LP_PARSER OR BUILD_TESTING)
CMAKE_DEPENDENT_OPTION(BUILD_re2 "Build the re2 dependency Library" OFF
"NOT BUILD_DEPS" ON)
message(STATUS "Build re2: ${BUILD_re2}")
Expand All @@ -199,6 +201,11 @@ else()
endif()

# Optional third party solvers (enabled by default)
## BOP
# note OFF is currently not supported.
CMAKE_DEPENDENT_OPTION(USE_BOP "Use the BOP solver" ON "BUILD_CXX" OFF)
message(STATUS "BOP support: ${USE_BOP}")

## COIN-OR Solvers (Cbc, Clp)
CMAKE_DEPENDENT_OPTION(USE_COINOR "Use the COIN-OR solver" ON "BUILD_CXX" OFF)
message(STATUS "COIN-OR support: ${USE_COINOR}")
Expand All @@ -224,8 +231,13 @@ if(USE_COINOR)
message(STATUS "Build Cbc: ${BUILD_Cbc}")
endif()

## GLOP
# note OFF is currently not supported.
CMAKE_DEPENDENT_OPTION(USE_GLOP "Use the GLOP solver" ON "BUILD_CXX" OFF)
message(STATUS "GLOP support: ${USE_GLOP}")

## GLPK
# Disable by default since it is GLPv3, user could enable it and release under GLPv3
# Disable by default since it is GPLv3, user could enable it and release under GPLv3
# see: https://www.apache.org/licenses/GPL-compatibility.html
CMAKE_DEPENDENT_OPTION(USE_GLPK "Use the GLPK solver" OFF "BUILD_CXX" OFF)
message(STATUS "GLPK support: ${USE_GLPK}")
Expand All @@ -238,6 +250,7 @@ endif()
## GUROBI
# Since it is dynamicaly loaded upon use, OFF is currently not supported.
CMAKE_DEPENDENT_OPTION(USE_GUROBI "Use the Gurobi solver" ON "BUILD_CXX" OFF)
message(STATUS "Gurobi support: ${USE_GUROBI}")

## HiGHS
# see: https://github.com/ERGO-Code/HiGHS
Expand All @@ -256,11 +269,6 @@ if(USE_PDLP)
CMAKE_DEPENDENT_OPTION(BUILD_PDLP "Build the PDLP dependency Library" ON
"NOT BUILD_DEPS" ON)
message(STATUS "Build PDLP: ${BUILD_PDLP}")
if(BUILD_PDLP)
CMAKE_DEPENDENT_OPTION(BUILD_Eigen3 "Build the eigen3 dependency Library" OFF
"NOT BUILD_DEPS" ON)
message(STATUS "Build eigen3: ${BUILD_Eigen3}")
endif()
endif()

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

## XPRESS
option(USE_XPRESS "Use the XPRESS solver" OFF)
message(STATUS "XPRESS support: ${USE_XPRESS}")
# Since it is dynamicaly loaded upon use, OFF is currently not supported.
CMAKE_DEPENDENT_OPTION(USE_XPRESS "Use the Xpress solver" ON "BUILD_CXX" OFF)
message(STATUS "Xpress support: ${USE_XPRESS}")

# Language specific options
if(BUILD_CXX)
Expand Down Expand Up @@ -362,6 +371,10 @@ if(BUILD_PYTHON)
"NOT BUILD_DEPS" ON)
message(STATUS "Python: Build pybind11_protobuf: ${BUILD_pybind11_protobuf}")

CMAKE_DEPENDENT_OPTION(BUILD_pybind11_abseil "Build the pybind11_abseil dependency Library" OFF
"NOT BUILD_DEPS" ON)
message(STATUS "Python: Build pybind11_abseil: ${BUILD_pybind11_abseil}")

option(GENERATE_PYTHON_STUB "Generate Python stub file (.pyi)" ON)
message(STATUS "Python: Generate stub file: ${GENERATE_PYTHON_STUB}")

Expand Down
25 changes: 16 additions & 9 deletions Dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
Protobuf=v25.0
abseil-cpp=20230802.1
Cbc=2.10.7
Cgl=0.60.5
Clp=1.17.7
Osi=0.108.7
CoinUtils=2.11.6
abseil-cpp=20240116.1
Protobuf=v25.3
Eigen=3.4.0
Re2=2023-11-01
Re2=2024-02-01
CoinUtils=2.11.6
Osi=0.108.7
Clp=1.17.7
Cgl=0.60.5
Cbc=2.10.7
GLPK=5.0
HiGHS=v1.6.0
Scip=v804
Scip=v810
# Python
pybind11=v2.11.1
pybind11_abseil=52f2739
pybind11_protobuf=3b11990
# Testing
googletest=v1.14.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010-2022 Google LLC
# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
OR_TOOLS_MAJOR=9
OR_TOOLS_MINOR=8
OR_TOOLS_MINOR=9
#PRE_RELEASE=YES
Loading

0 comments on commit 3ed2b2d

Please sign in to comment.