bazel: require C++20
needed by pdlp/
This commit is contained in:
4
.github/workflows/bazel_linux.yml
vendored
4
.github/workflows/bazel_linux.yml
vendored
@@ -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
|
||||
|
||||
4
.github/workflows/bazel_macos.yml
vendored
4
.github/workflows/bazel_macos.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user