OS | C++ |
---|---|
amd64 Linux | |
arm64 MacOS | |
amd64 MacOS | |
amd64 Windows |
Dockers [Alpine, Archlinux, Centos, Debian, Fedora, OpenSuse, Ubuntu]:
| Requirement | Dependencies | Compilation | Testing | Integration | CI |OR-Tools comes with a Bazel based build (WORKSPACE) that can be used on a wide range of platforms. If you don't have Bazel installed already, you can download it for free from https://bazel.build/.
warning: Currently OR-Tools Bazel doesn't support Python, Java nor .Net, please use the Makefile or CMake based build instead.
You'll need:
Bazel >= 5.4.0
.- A compiler with C++17 support.
Here the list of supported solvers:
- CP-SAT
- GLOP
- GLPK
- PDLP
- SCIP
OR-Tools depends on several mandatory libraries.
- Eigen
- Google Abseil-cpp,
- Google Protobuf,
- Google Gtest,
- Bliss,
- SCIP,
- GLPK (GNU Linear Programming Kit)
You must compile OR-Tools using at least C++17 (C++20 on windows):
-
on UNIX:
bazel build -c opt --cxxopt=-std=c++17 ...
-
on Windows when using MSVC:
bazel build -c opt --cxxopt="/std:c++20" ...
You may run tests using:
-
on UNIX:
bazel test -c opt --cxxopt=-std=c++17 ...
-
on Windows when using MSVC:
bazel test -c opt --cxxopt="/std:c++20" ...
To integrate OR-Tools in your own Bazel project, you can take a look at the template project: or-tools/bazel_or-tools.