bazel: require C++20

needed by pdlp/
This commit is contained in:
Corentin Le Molgat
2022-02-18 16:27:52 +01:00
parent b4d3a3d8f9
commit 1572a841c7
10 changed files with 23 additions and 23 deletions

View File

@@ -23,6 +23,6 @@ jobs:
sudo apt-get install bazel
bazel --version
- name: Build
run: bazel build --cxxopt=-std=c++17 //...:all
run: bazel build --cxxopt=-std=c++20 //...:all
- name: Test
run: bazel test --cxxopt=-std=c++17 //...:all
run: bazel test --cxxopt=-std=c++20 //...:all

View File

@@ -19,6 +19,6 @@ jobs:
#brew install bazel
bazel --version
- name: Build
run: bazel build --cxxopt=-std=c++17 //...:all
run: bazel build --cxxopt=-std=c++20 //...:all
- name: Test
run: bazel test --cxxopt=-std=c++17 //...:all
run: bazel test --cxxopt=-std=c++20 //...:all

View File

@@ -53,15 +53,15 @@ OR-Tools depends on severals mandatory libraries.
## Compilation
You must compile OR-Tools using C++17:
You must compile OR-Tools using C++20:
* on UNIX:
```sh
bazel build --cxxopt=-std=c++17 //...:all
bazel build --cxxopt=-std=c++20 //...:all
```
* on Windows when using MSVC:
```sh
bazel build --cxxopt="-std:c++17" //...:all
bazel build --cxxopt="-std:c++20" //...:all
```
## Testing
@@ -70,11 +70,11 @@ You may run tests using:
* on UNIX:
```sh
bazel test --cxxopt=-std=c++17 //...:all
bazel test --cxxopt=-std=c++20 //...:all
```
* on Windows when using MSVC:
```sh
bazel test --cxxopt="-std:c++17" //...:all
bazel test --cxxopt="-std:c++20" //...:all
```
## Integration

View File

@@ -23,7 +23,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --host_javabase=@local_jdk//:jdk --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --host_javabase=@local_jdk//:jdk --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test --curses=no --host_javabase=@local_jdk//:jdk --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test --curses=no --host_javabase=@local_jdk//:jdk --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -12,7 +12,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -23,7 +23,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -24,7 +24,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -19,7 +19,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -15,7 +15,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all

View File

@@ -27,7 +27,7 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel build --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all
FROM build AS test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
RUN bazel test -c opt --curses=no --cxxopt=-std=c++20 --copt='-Wno-sign-compare' //...:all