Files
ortools-clone/bazel
Corentin Le Molgat 5e22237e6f Update Protobuf 3.19.4 -> v21.5
note: python 4.21.5, all others languages 3.21.5
2022-09-02 13:47:01 +02:00
..
2022-08-29 16:09:21 +02:00
2022-06-21 11:25:29 +02:00
2022-06-21 11:25:29 +02:00
2020-07-03 10:34:45 +02:00
2022-06-21 11:25:29 +02:00
2022-06-21 11:25:29 +02:00
2022-02-09 10:48:41 +01:00
2020-12-23 11:50:22 +01:00
2022-06-21 11:25:29 +02:00

OR-Tools Bazel Build Instructions

OS C++
Linux Status
MacOS Status
Windows Status

Dockers [Alpine, Archlinux, Centos, Debian, Fedora, OpenSuse, Ubuntu]: Status

Introduction

| 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.

Requirement

You'll need:

  • Bazel >= 4.0.

Solvers supported

Here the list of supported solvers:

  • CP-SAT
  • GLOP
  • GLPK
  • PDLP
  • SCIP

Dependencies

OR-Tools depends on several mandatory libraries.

  • Eigen
  • Google Abseil-cpp,
  • Google Protobuf,
  • Google Gtest,
  • Bliss,
  • SCIP,
  • GLPK (GNU Linear Programming Kit)

Compilation

You must compile OR-Tools using C++20:

  • on UNIX:

    bazel build --cxxopt=-std=c++17 ...
    
  • on Windows when using MSVC:

    bazel build --cxxopt="/std:c++20" ...
    

Testing

You may run tests using:

  • on UNIX:

    bazel test --cxxopt=-std=c++17 ...
    
  • on Windows when using MSVC:

    bazel test --cxxopt="/std:c++20" ...
    

Integration

To integrate OR-Tools in your own Bazel project, you can take a look at the template project: or-tools/bazel_or-tools.