Simple Directmedia Layer

msbuild: add TreatWarningAsError property, and enable it on ci

Changed files
+161
.github
VisualC
SDL
SDL_test
tests
VisualC-GDK
SDL
SDL_test
tests
testcontroller
testgdk
testsprite
VisualC-WinRT
+1
.github/workflows/create-test-plan.py
··· 321 321 job.setup_ninja = not spec.gdk 322 322 job.clang_tidy = False # complains about \threadsafety: "unknown command tag name [clang-diagnostic-documentation-unknown-command]" 323 323 job.msvc_project = spec.msvc_project if spec.msvc_project else "" 324 + job.msvc_project_flags.append("-p:TreatWarningsAsError=true") 324 325 job.test_pkg_config = False 325 326 job.cmake_arguments.extend(( 326 327 "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase",
+5
VisualC-GDK/SDL/SDL.vcxproj
··· 306 306 <Message>Building shader blobs (Xbox One)</Message> 307 307 </PreBuildEvent> 308 308 </ItemDefinitionGroup> 309 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 310 + <ClCompile> 311 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 312 + </ClCompile> 313 + </ItemDefinitionGroup> 309 314 <ItemGroup> 310 315 <ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" /> 311 316 <ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
+5
VisualC-GDK/SDL_test/SDL_test.vcxproj
··· 184 184 <OmitDefaultLibName>true</OmitDefaultLibName> 185 185 </ClCompile> 186 186 </ItemDefinitionGroup> 187 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 188 + <ClCompile> 189 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 190 + </ClCompile> 191 + </ItemDefinitionGroup> 187 192 <ItemGroup> 188 193 <ClCompile Include="..\..\src\test\SDL_test_assert.c" /> 189 194 <ClCompile Include="..\..\src\test\SDL_test_common.c" />
+5
VisualC-GDK/tests/testcontroller/testcontroller.vcxproj
··· 260 260 <AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies> 261 261 </Link> 262 262 </ItemDefinitionGroup> 263 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 264 + <ClCompile> 265 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 266 + </ClCompile> 267 + </ItemDefinitionGroup> 263 268 <ItemGroup> 264 269 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 265 270 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC-GDK/tests/testgdk/testgdk.vcxproj
··· 284 284 </Command> 285 285 </PostBuildEvent> 286 286 </ItemDefinitionGroup> 287 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 288 + <ClCompile> 289 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 290 + </ClCompile> 291 + </ItemDefinitionGroup> 287 292 <ItemGroup> 288 293 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 289 294 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC-GDK/tests/testsprite/testsprite.vcxproj
··· 284 284 </Command> 285 285 </PostBuildEvent> 286 286 </ItemDefinitionGroup> 287 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 288 + <ClCompile> 289 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 290 + </ClCompile> 291 + </ItemDefinitionGroup> 287 292 <ItemGroup> 288 293 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 289 294 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC-WinRT/SDL-UWP.vcxproj
··· 916 916 <AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions> 917 917 </Link> 918 918 </ItemDefinitionGroup> 919 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 920 + <ClCompile> 921 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 922 + </ClCompile> 923 + </ItemDefinitionGroup> 919 924 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 920 925 <ImportGroup Label="ExtensionTargets"> 921 926 <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
+5
VisualC-WinRT/testdraw/testdraw.vcxproj
··· 264 264 <PrecompiledHeader>NotUsing</PrecompiledHeader> 265 265 </ClCompile> 266 266 </ItemDefinitionGroup> 267 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 268 + <ClCompile> 269 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 270 + </ClCompile> 271 + </ItemDefinitionGroup> 267 272 <ItemGroup> 268 273 <Image Include="Assets\LockScreenLogo.scale-200.png" /> 269 274 <Image Include="Assets\SplashScreen.scale-200.png" />
+5
VisualC/SDL/SDL.vcxproj
··· 230 230 <EnableCOMDATFolding>true</EnableCOMDATFolding> 231 231 </Link> 232 232 </ItemDefinitionGroup> 233 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 234 + <ClCompile> 235 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 236 + </ClCompile> 237 + </ItemDefinitionGroup> 233 238 <ItemGroup> 234 239 <ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" /> 235 240 <ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
+5
VisualC/SDL_test/SDL_test.vcxproj
··· 152 152 <MultiProcessorCompilation>true</MultiProcessorCompilation> 153 153 </ClCompile> 154 154 </ItemDefinitionGroup> 155 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 156 + <ClCompile> 157 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 158 + </ClCompile> 159 + </ItemDefinitionGroup> 155 160 <ItemGroup> 156 161 <ClCompile Include="..\..\src\test\SDL_test_assert.c" /> 157 162 <ClCompile Include="..\..\src\test\SDL_test_common.c" />
+5
VisualC/tests/checkkeys/checkkeys.vcxproj
··· 183 183 <SubSystem>Windows</SubSystem> 184 184 </Link> 185 185 </ItemDefinitionGroup> 186 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 187 + <ClCompile> 188 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 189 + </ClCompile> 190 + </ItemDefinitionGroup> 186 191 <ItemGroup> 187 192 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 188 193 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/loopwave/loopwave.vcxproj
··· 183 183 <SubSystem>Windows</SubSystem> 184 184 </Link> 185 185 </ItemDefinitionGroup> 186 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 187 + <ClCompile> 188 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 189 + </ClCompile> 190 + </ItemDefinitionGroup> 186 191 <ItemGroup> 187 192 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 188 193 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testatomic/testatomic.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testautomation/testautomation.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testcontroller/testcontroller.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testdraw/testdraw.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testfile/testfile.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testgl/testgl.vcxproj
··· 181 181 <SubSystem>Windows</SubSystem> 182 182 </Link> 183 183 </ItemDefinitionGroup> 184 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 185 + <ClCompile> 186 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 187 + </ClCompile> 188 + </ItemDefinitionGroup> 184 189 <ItemGroup> 185 190 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 186 191 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testgles2/testgles2.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testoverlay/testoverlay.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testpen/testpen.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testplatform/testplatform.vcxproj
··· 205 205 <OutputFile>.\Release/testplatform.bsc</OutputFile> 206 206 </Bscmake> 207 207 </ItemDefinitionGroup> 208 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 209 + <ClCompile> 210 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 211 + </ClCompile> 212 + </ItemDefinitionGroup> 208 213 <ItemGroup> 209 214 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 210 215 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testpower/testpower.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testrendertarget/testrendertarget.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testrumble/testrumble.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testscale/testscale.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testsensor/testsensor.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testshape/testshape.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testsprite/testsprite.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testsurround/testsurround.vcxproj
··· 183 183 <SubSystem>Console</SubSystem> 184 184 </Link> 185 185 </ItemDefinitionGroup> 186 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 187 + <ClCompile> 188 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 189 + </ClCompile> 190 + </ItemDefinitionGroup> 186 191 <ItemGroup> 187 192 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 188 193 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testvulkan/testvulkan.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL_test\SDL_test.vcxproj"> 182 187 <Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
+5
VisualC/tests/testwm/testwm.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
+5
VisualC/tests/testyuv/testyuv.vcxproj
··· 177 177 <SubSystem>Windows</SubSystem> 178 178 </Link> 179 179 </ItemDefinitionGroup> 180 + <ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''"> 181 + <ClCompile> 182 + <TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError> 183 + </ClCompile> 184 + </ItemDefinitionGroup> 180 185 <ItemGroup> 181 186 <ProjectReference Include="..\..\SDL\SDL.vcxproj"> 182 187 <Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>