mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 01:01:04 +00:00
Add c++ version to .bazelrc (#5247)
I finally found out how to add platform specific options to the bazelrc file. I will use that to add the c++ language level to the bazelrc flie.
This commit is contained in:
parent
cf62673e42
commit
8841d560c4
4
.bazelrc
Normal file
4
.bazelrc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
build --enable_platform_specific_config
|
||||||
|
build:linux --cxxopt=-std=c++17
|
||||||
|
build:macos --cxxopt=-std=c++17
|
||||||
|
build:windows --cxxopt=/std:c++17
|
8
.github/workflows/bazel.yml
vendored
8
.github/workflows/bazel.yml
vendored
@ -30,13 +30,13 @@ jobs:
|
|||||||
key: bazel-cache-${{ runner.os }}
|
key: bazel-cache-${{ runner.os }}
|
||||||
- name: Build All (Windows)
|
- name: Build All (Windows)
|
||||||
if: ${{matrix.os == 'windows-latest' }}
|
if: ${{matrix.os == 'windows-latest' }}
|
||||||
run: bazel --output_user_root=~/.bazel/cache build --cxxopt=/std:c++17 //...
|
run: bazel --output_user_root=~/.bazel/cache build //...
|
||||||
- name: Test All (Windows)
|
- name: Test All (Windows)
|
||||||
if: ${{matrix.os == 'windows-latest' }}
|
if: ${{matrix.os == 'windows-latest' }}
|
||||||
run: bazel --output_user_root=~/.bazel/cache test --cxxopt=/std:c++17 //...
|
run: bazel --output_user_root=~/.bazel/cache test //...
|
||||||
- name: Build All (Linux, MacOS)
|
- name: Build All (Linux, MacOS)
|
||||||
if: ${{ matrix.os != 'windows-latest' }}
|
if: ${{ matrix.os != 'windows-latest' }}
|
||||||
run: bazel --output_user_root=~/.bazel/cache build --cxxopt=-std=c++17 //...
|
run: bazel --output_user_root=~/.bazel/cache build //...
|
||||||
- name: Test All (Linux, MacOS)
|
- name: Test All (Linux, MacOS)
|
||||||
if: ${{ matrix.os != 'windows-latest' }}
|
if: ${{ matrix.os != 'windows-latest' }}
|
||||||
run: bazel --output_user_root=~/.bazel/cache test --cxxopt=-std=c++17 //...
|
run: bazel --output_user_root=~/.bazel/cache test //...
|
||||||
|
@ -386,15 +386,8 @@ fuzzer tests.
|
|||||||
### Build using Bazel
|
### Build using Bazel
|
||||||
You can also use [Bazel](https://bazel.build/) to build the project.
|
You can also use [Bazel](https://bazel.build/) to build the project.
|
||||||
|
|
||||||
On linux:
|
|
||||||
```sh
|
```sh
|
||||||
cd <spirv-dir>
|
bazel build :all
|
||||||
bazel build --cxxopt=-std=c++17 :all
|
|
||||||
```
|
|
||||||
|
|
||||||
On windows:
|
|
||||||
```sh
|
|
||||||
bazel build --cxxopt=/std:c++17 :all
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build a node.js package using Emscripten
|
### Build a node.js package using Emscripten
|
||||||
|
Loading…
Reference in New Issue
Block a user