Skip to content

Commit a96fe8f

Browse files
committed
Fix warnings on Build .NET Windows
1 parent 99fda81 commit a96fe8f

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ jobs:
203203
steps:
204204
- uses: actions/checkout@v3
205205
- name: Setup .NET Core SDK
206-
uses: actions/setup-dotnet@v3
206+
uses: actions/setup-dotnet@v4.2
207207
with:
208208
dotnet-version: '8.0.x'
209209
- name: Build
210210
run: |
211211
cd tests\FlatBuffers.Test
212212
dotnet new sln --force --name FlatBuffers.Test
213213
dotnet sln FlatBuffers.Test.sln add FlatBuffers.Test.csproj
214-
dotnet build -c Release ${{matrix.configuration}} -o out FlatBuffers.Test.sln
214+
dotnet build -c Release ${{matrix.configuration}} --property:PublishDir=out FlatBuffers.Test.sln
215215
- name: Run
216216
run: |
217217
cd tests\FlatBuffers.Test

docs/source/building.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ Use `cmake` to configure a project based on your environment and platform.
3434
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release
3535
```
3636

37+
#### Strict Mode
38+
39+
By default, `cmake` will configure targets to **not** build with strict warnings
40+
on (e.g. `-Werror` or `/WX`). This may cause into issues when submitting code
41+
changes since our CI requires the code to compile in strict mode.
42+
43+
To enable the extra warnings, turn on strict mode with the
44+
`FLATBUFFERS_STRICT_MODE` cmake option.
45+
46+
```cmake
47+
cmake -DFLATBUFFERS_STRICT_MODE=ON
48+
```
49+
50+
3751
### Building
3852

3953
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.
5670
xcodebuild -toolchain clang -configuration Release
5771
```
5872

73+
74+
75+
76+
77+
5978
## Building with Bazel
6079

6180
## Building with VCPKG

0 commit comments

Comments
 (0)