From 4b3a80bb73fd953126e4daaf4b63acc8ebd76de3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 4 Aug 2024 21:23:25 +0200 Subject: [PATCH] msbuild: add TreatWarningAsError property, and enable it on ci --- .github/workflows/create-test-plan.py | 1 + VisualC-GDK/SDL/SDL.vcxproj | 5 +++++ VisualC-GDK/SDL_test/SDL_test.vcxproj | 5 +++++ VisualC-GDK/tests/testcontroller/testcontroller.vcxproj | 5 +++++ VisualC-GDK/tests/testgdk/testgdk.vcxproj | 5 +++++ VisualC-GDK/tests/testsprite/testsprite.vcxproj | 5 +++++ VisualC-WinRT/SDL-UWP.vcxproj | 5 +++++ VisualC-WinRT/testdraw/testdraw.vcxproj | 5 +++++ VisualC/SDL/SDL.vcxproj | 5 +++++ VisualC/SDL_test/SDL_test.vcxproj | 5 +++++ VisualC/tests/checkkeys/checkkeys.vcxproj | 5 +++++ VisualC/tests/loopwave/loopwave.vcxproj | 5 +++++ VisualC/tests/testatomic/testatomic.vcxproj | 5 +++++ VisualC/tests/testautomation/testautomation.vcxproj | 5 +++++ VisualC/tests/testcontroller/testcontroller.vcxproj | 5 +++++ VisualC/tests/testdraw/testdraw.vcxproj | 5 +++++ VisualC/tests/testfile/testfile.vcxproj | 5 +++++ VisualC/tests/testgl/testgl.vcxproj | 5 +++++ VisualC/tests/testgles2/testgles2.vcxproj | 5 +++++ VisualC/tests/testoverlay/testoverlay.vcxproj | 5 +++++ VisualC/tests/testpen/testpen.vcxproj | 5 +++++ VisualC/tests/testplatform/testplatform.vcxproj | 5 +++++ VisualC/tests/testpower/testpower.vcxproj | 5 +++++ VisualC/tests/testrendertarget/testrendertarget.vcxproj | 5 +++++ VisualC/tests/testrumble/testrumble.vcxproj | 5 +++++ VisualC/tests/testscale/testscale.vcxproj | 5 +++++ VisualC/tests/testsensor/testsensor.vcxproj | 5 +++++ VisualC/tests/testshape/testshape.vcxproj | 5 +++++ VisualC/tests/testsprite/testsprite.vcxproj | 5 +++++ VisualC/tests/testsurround/testsurround.vcxproj | 5 +++++ VisualC/tests/testvulkan/testvulkan.vcxproj | 5 +++++ VisualC/tests/testwm/testwm.vcxproj | 5 +++++ VisualC/tests/testyuv/testyuv.vcxproj | 5 +++++ 33 files changed, 161 insertions(+) diff --git a/.github/workflows/create-test-plan.py b/.github/workflows/create-test-plan.py index c6d4f0aa8..a1850134f 100755 --- a/.github/workflows/create-test-plan.py +++ b/.github/workflows/create-test-plan.py @@ -321,6 +321,7 @@ def spec_to_job(spec: JobSpec) -> JobDetails: job.setup_ninja = not spec.gdk job.clang_tidy = False # complains about \threadsafety: "unknown command tag name [clang-diagnostic-documentation-unknown-command]" job.msvc_project = spec.msvc_project if spec.msvc_project else "" + job.msvc_project_flags.append("-p:TreatWarningsAsError=true") job.test_pkg_config = False job.cmake_arguments.extend(( "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase", diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj index f8905e12d..77fc0785a 100644 --- a/VisualC-GDK/SDL/SDL.vcxproj +++ b/VisualC-GDK/SDL/SDL.vcxproj @@ -306,6 +306,11 @@ Building shader blobs (Xbox One) + + + $(TreatWarningsAsError) + + diff --git a/VisualC-GDK/SDL_test/SDL_test.vcxproj b/VisualC-GDK/SDL_test/SDL_test.vcxproj index 2c7ada3ca..7505baf86 100644 --- a/VisualC-GDK/SDL_test/SDL_test.vcxproj +++ b/VisualC-GDK/SDL_test/SDL_test.vcxproj @@ -184,6 +184,11 @@ true + + + $(TreatWarningsAsError) + + diff --git a/VisualC-GDK/tests/testcontroller/testcontroller.vcxproj b/VisualC-GDK/tests/testcontroller/testcontroller.vcxproj index 51f1d92cd..d7ad95cf2 100644 --- a/VisualC-GDK/tests/testcontroller/testcontroller.vcxproj +++ b/VisualC-GDK/tests/testcontroller/testcontroller.vcxproj @@ -260,6 +260,11 @@ xgameruntime.lib;%(AdditionalDependencies) + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC-GDK/tests/testgdk/testgdk.vcxproj b/VisualC-GDK/tests/testgdk/testgdk.vcxproj index 27b9662d6..41293cada 100644 --- a/VisualC-GDK/tests/testgdk/testgdk.vcxproj +++ b/VisualC-GDK/tests/testgdk/testgdk.vcxproj @@ -284,6 +284,11 @@ + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC-GDK/tests/testsprite/testsprite.vcxproj b/VisualC-GDK/tests/testsprite/testsprite.vcxproj index a3af667e7..3885aec28 100644 --- a/VisualC-GDK/tests/testsprite/testsprite.vcxproj +++ b/VisualC-GDK/tests/testsprite/testsprite.vcxproj @@ -284,6 +284,11 @@ + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC-WinRT/SDL-UWP.vcxproj b/VisualC-WinRT/SDL-UWP.vcxproj index b5a5a49f4..7a5c81952 100644 --- a/VisualC-WinRT/SDL-UWP.vcxproj +++ b/VisualC-WinRT/SDL-UWP.vcxproj @@ -916,6 +916,11 @@ /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions) + + + $(TreatWarningsAsError) + + diff --git a/VisualC-WinRT/testdraw/testdraw.vcxproj b/VisualC-WinRT/testdraw/testdraw.vcxproj index eea5a6ccd..86d985dba 100644 --- a/VisualC-WinRT/testdraw/testdraw.vcxproj +++ b/VisualC-WinRT/testdraw/testdraw.vcxproj @@ -264,6 +264,11 @@ NotUsing + + + $(TreatWarningsAsError) + + diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj index 59e786fc2..4cb8de774 100644 --- a/VisualC/SDL/SDL.vcxproj +++ b/VisualC/SDL/SDL.vcxproj @@ -230,6 +230,11 @@ true + + + $(TreatWarningsAsError) + + diff --git a/VisualC/SDL_test/SDL_test.vcxproj b/VisualC/SDL_test/SDL_test.vcxproj index 90b52243c..541f7cb0c 100644 --- a/VisualC/SDL_test/SDL_test.vcxproj +++ b/VisualC/SDL_test/SDL_test.vcxproj @@ -152,6 +152,11 @@ true + + + $(TreatWarningsAsError) + + diff --git a/VisualC/tests/checkkeys/checkkeys.vcxproj b/VisualC/tests/checkkeys/checkkeys.vcxproj index 7d35d4bce..cc263df07 100644 --- a/VisualC/tests/checkkeys/checkkeys.vcxproj +++ b/VisualC/tests/checkkeys/checkkeys.vcxproj @@ -183,6 +183,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/loopwave/loopwave.vcxproj b/VisualC/tests/loopwave/loopwave.vcxproj index 13d37fdfb..a5912a9a8 100644 --- a/VisualC/tests/loopwave/loopwave.vcxproj +++ b/VisualC/tests/loopwave/loopwave.vcxproj @@ -183,6 +183,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testatomic/testatomic.vcxproj b/VisualC/tests/testatomic/testatomic.vcxproj index c9ab811a8..5a1efef2d 100644 --- a/VisualC/tests/testatomic/testatomic.vcxproj +++ b/VisualC/tests/testatomic/testatomic.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testautomation/testautomation.vcxproj b/VisualC/tests/testautomation/testautomation.vcxproj index 666c7155b..af345542d 100644 --- a/VisualC/tests/testautomation/testautomation.vcxproj +++ b/VisualC/tests/testautomation/testautomation.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testcontroller/testcontroller.vcxproj b/VisualC/tests/testcontroller/testcontroller.vcxproj index 8c0854b14..94c8629a1 100644 --- a/VisualC/tests/testcontroller/testcontroller.vcxproj +++ b/VisualC/tests/testcontroller/testcontroller.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testdraw/testdraw.vcxproj b/VisualC/tests/testdraw/testdraw.vcxproj index e3e232a7d..5ca57bf08 100644 --- a/VisualC/tests/testdraw/testdraw.vcxproj +++ b/VisualC/tests/testdraw/testdraw.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testfile/testfile.vcxproj b/VisualC/tests/testfile/testfile.vcxproj index 6d9c371b1..a38880d5e 100644 --- a/VisualC/tests/testfile/testfile.vcxproj +++ b/VisualC/tests/testfile/testfile.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testgl/testgl.vcxproj b/VisualC/tests/testgl/testgl.vcxproj index 1e32a9049..b8bc234ec 100644 --- a/VisualC/tests/testgl/testgl.vcxproj +++ b/VisualC/tests/testgl/testgl.vcxproj @@ -181,6 +181,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testgles2/testgles2.vcxproj b/VisualC/tests/testgles2/testgles2.vcxproj index 743af4b8c..13d0df290 100644 --- a/VisualC/tests/testgles2/testgles2.vcxproj +++ b/VisualC/tests/testgles2/testgles2.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testoverlay/testoverlay.vcxproj b/VisualC/tests/testoverlay/testoverlay.vcxproj index 5272c28d2..80c8b0304 100644 --- a/VisualC/tests/testoverlay/testoverlay.vcxproj +++ b/VisualC/tests/testoverlay/testoverlay.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testpen/testpen.vcxproj b/VisualC/tests/testpen/testpen.vcxproj index 79f252627..fdef64f23 100644 --- a/VisualC/tests/testpen/testpen.vcxproj +++ b/VisualC/tests/testpen/testpen.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testplatform/testplatform.vcxproj b/VisualC/tests/testplatform/testplatform.vcxproj index 5ef911d1d..788429ec5 100644 --- a/VisualC/tests/testplatform/testplatform.vcxproj +++ b/VisualC/tests/testplatform/testplatform.vcxproj @@ -205,6 +205,11 @@ .\Release/testplatform.bsc + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testpower/testpower.vcxproj b/VisualC/tests/testpower/testpower.vcxproj index abf6b8c6b..98ca2b53a 100644 --- a/VisualC/tests/testpower/testpower.vcxproj +++ b/VisualC/tests/testpower/testpower.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testrendertarget/testrendertarget.vcxproj b/VisualC/tests/testrendertarget/testrendertarget.vcxproj index 8582f01dd..eaf719bb2 100644 --- a/VisualC/tests/testrendertarget/testrendertarget.vcxproj +++ b/VisualC/tests/testrendertarget/testrendertarget.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testrumble/testrumble.vcxproj b/VisualC/tests/testrumble/testrumble.vcxproj index c50bd4523..c0cb1090b 100644 --- a/VisualC/tests/testrumble/testrumble.vcxproj +++ b/VisualC/tests/testrumble/testrumble.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testscale/testscale.vcxproj b/VisualC/tests/testscale/testscale.vcxproj index 957f8b557..3843e57ae 100644 --- a/VisualC/tests/testscale/testscale.vcxproj +++ b/VisualC/tests/testscale/testscale.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testsensor/testsensor.vcxproj b/VisualC/tests/testsensor/testsensor.vcxproj index bc8495e57..3f034ad39 100644 --- a/VisualC/tests/testsensor/testsensor.vcxproj +++ b/VisualC/tests/testsensor/testsensor.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testshape/testshape.vcxproj b/VisualC/tests/testshape/testshape.vcxproj index 0dc50470e..33521f684 100644 --- a/VisualC/tests/testshape/testshape.vcxproj +++ b/VisualC/tests/testshape/testshape.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testsprite/testsprite.vcxproj b/VisualC/tests/testsprite/testsprite.vcxproj index d9011921f..f53408ff5 100644 --- a/VisualC/tests/testsprite/testsprite.vcxproj +++ b/VisualC/tests/testsprite/testsprite.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testsurround/testsurround.vcxproj b/VisualC/tests/testsurround/testsurround.vcxproj index 950f22e9f..657dd1f3d 100644 --- a/VisualC/tests/testsurround/testsurround.vcxproj +++ b/VisualC/tests/testsurround/testsurround.vcxproj @@ -183,6 +183,11 @@ Console + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testvulkan/testvulkan.vcxproj b/VisualC/tests/testvulkan/testvulkan.vcxproj index 158a4253f..800aa50ff 100644 --- a/VisualC/tests/testvulkan/testvulkan.vcxproj +++ b/VisualC/tests/testvulkan/testvulkan.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {da956fd3-e143-46f2-9fe5-c77bebc56b1a} diff --git a/VisualC/tests/testwm/testwm.vcxproj b/VisualC/tests/testwm/testwm.vcxproj index b88dd5356..b16df2434 100644 --- a/VisualC/tests/testwm/testwm.vcxproj +++ b/VisualC/tests/testwm/testwm.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} diff --git a/VisualC/tests/testyuv/testyuv.vcxproj b/VisualC/tests/testyuv/testyuv.vcxproj index 14e5e7780..e0eefbd74 100644 --- a/VisualC/tests/testyuv/testyuv.vcxproj +++ b/VisualC/tests/testyuv/testyuv.vcxproj @@ -177,6 +177,11 @@ Windows + + + $(TreatWarningsAsError) + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68}