mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 08:50:00 +00:00
Fix warnings on Build .NET Windows
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -203,7 +203,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup .NET Core SDK
|
- name: Setup .NET Core SDK
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v4.2
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -211,7 +211,7 @@ jobs:
|
|||||||
cd tests\FlatBuffers.Test
|
cd tests\FlatBuffers.Test
|
||||||
dotnet new sln --force --name FlatBuffers.Test
|
dotnet new sln --force --name FlatBuffers.Test
|
||||||
dotnet sln FlatBuffers.Test.sln add FlatBuffers.Test.csproj
|
dotnet sln FlatBuffers.Test.sln add FlatBuffers.Test.csproj
|
||||||
dotnet build -c Release ${{matrix.configuration}} -o out FlatBuffers.Test.sln
|
dotnet build -c Release ${{matrix.configuration}} --property:PublishDir=out FlatBuffers.Test.sln
|
||||||
- name: Run
|
- name: Run
|
||||||
run: |
|
run: |
|
||||||
cd tests\FlatBuffers.Test
|
cd tests\FlatBuffers.Test
|
||||||
|
|||||||
@@ -34,6 +34,20 @@ Use `cmake` to configure a project based on your environment and platform.
|
|||||||
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release
|
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Strict Mode
|
||||||
|
|
||||||
|
By default, `cmake` will configure targets to **not** build with strict warnings
|
||||||
|
on (e.g. `-Werror` or `/WX`). This may cause into issues when submitting code
|
||||||
|
changes since our CI requires the code to compile in strict mode.
|
||||||
|
|
||||||
|
To enable the extra warnings, turn on strict mode with the
|
||||||
|
`FLATBUFFERS_STRICT_MODE` cmake option.
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
cmake -DFLATBUFFERS_STRICT_MODE=ON
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
Once the project files are generated, build as normal for your platform.
|
Once the project files are generated, build as normal for your platform.
|
||||||
@@ -56,6 +70,11 @@ Once the project files are generated, build as normal for your platform.
|
|||||||
xcodebuild -toolchain clang -configuration Release
|
xcodebuild -toolchain clang -configuration Release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Building with Bazel
|
## Building with Bazel
|
||||||
|
|
||||||
## Building with VCPKG
|
## Building with VCPKG
|
||||||
|
|||||||
Reference in New Issue
Block a user