mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 02:43:30 +08:00
msbuild: add TreatWarningAsError property, and enable it on ci
This commit is contained in:
parent
a699ff2419
commit
4b3a80bb73
1
.github/workflows/create-test-plan.py
vendored
1
.github/workflows/create-test-plan.py
vendored
@ -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",
|
||||
|
@ -306,6 +306,11 @@
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
|
||||
|
@ -184,6 +184,11 @@
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
|
@ -260,6 +260,11 @@
|
||||
<AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -284,6 +284,11 @@
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -284,6 +284,11 @@
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -916,6 +916,11 @@
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
|
@ -264,6 +264,11 @@
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\LockScreenLogo.scale-200.png" />
|
||||
<Image Include="Assets\SplashScreen.scale-200.png" />
|
||||
|
@ -230,6 +230,11 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_begin_code.h" />
|
||||
<ClInclude Include="..\..\include\SDL3\SDL_camera.h" />
|
||||
|
@ -152,6 +152,11 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
|
||||
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
|
||||
|
@ -183,6 +183,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -183,6 +183,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -181,6 +181,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -205,6 +205,11 @@
|
||||
<OutputFile>.\Release/testplatform.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -183,6 +183,11 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL_test\SDL_test.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
@ -177,6 +177,11 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(TreatWarningsAsError)'!=''">
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>$(TreatWarningsAsError)</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user