diff options
| author | Eric Engestrom <eric@engestrom.ch> | 2022-08-17 20:57:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-17 12:57:15 -0700 |
| commit | d65c6183c0d8b365aa182c3d9026ba85522531f2 (patch) | |
| tree | acffd9f5d57d56e88e3ba06d4e86aea1cfa460f7 | |
| parent | cbc7e62f42bc0770fbd9da20ed39a5191778e2af (diff) | |
Move -Werror to CI (#2362)
* move -Werror to CI
This allows people with a more up-to-date system than you to still compile your project, while still allowing you to block on every warning in your own development.
* Fixes.
* More fix.
* more fix.
* Disable werror for gcc.
* Fix bash.
* fix
* fix yml
Co-authored-by: Yong He <yonghe@outlook.com>
Co-authored-by: Yong He <yhe@nvidia.com>
| -rw-r--r-- | .github/workflows/linux.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 3 | ||||
| -rw-r--r-- | .github/workflows/windows.yml | 2 | ||||
| -rw-r--r-- | build/visual-studio/compiler-core/compiler-core.vcxproj | 24 | ||||
| -rw-r--r-- | build/visual-studio/core/core.vcxproj | 24 | ||||
| -rw-r--r-- | build/visual-studio/slang-rt/slang-rt.vcxproj | 12 | ||||
| -rw-r--r-- | build/visual-studio/slang/slang.vcxproj | 12 | ||||
| -rw-r--r-- | premake5.lua | 12 |
8 files changed, 15 insertions, 81 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e25d03908..ebc658792 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -21,10 +21,15 @@ jobs: submodules: 'true' fetch-depth: '0' - name: build - run: + run: | CC=${{matrix.compiler}} CONFIGURATION=${{matrix.configuration}} ARCH=${{matrix.platform}} + if [[ "$CC" == "clang" ]]; then + CFLAGS=-Werror + CPPFLAGS=-Werror + CXXFLAGS=-Werror + fi source ./github_build.sh - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e9e7a7dbf..a10467f06 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -27,6 +27,9 @@ jobs: CC=${{matrix.compiler}} CONFIGURATION=${{matrix.configuration}} ARCH=${{matrix.platform}} + CPPFLAGS=-Werror + CFLAGS=-Werror + CXXFLAGS=-Werror source ./github_macos_build.sh - name: Package id: package diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 994f15853..4fb9f0c58 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -28,7 +28,7 @@ jobs: .\premake.bat vs2017 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true - name: build run: - MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 + MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 -warnAsError - uses: actions/upload-artifact@v3 with: name: slang-build-${{matrix.configuration}}-${{matrix.platform}}-${{matrix.compiler}} diff --git a/build/visual-studio/compiler-core/compiler-core.vcxproj b/build/visual-studio/compiler-core/compiler-core.vcxproj index ba0ddde88..34ca85ef3 100644 --- a/build/visual-studio/compiler-core/compiler-core.vcxproj +++ b/build/visual-studio/compiler-core/compiler-core.vcxproj @@ -157,7 +157,6 @@ <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
@@ -167,15 +166,11 @@ <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
@@ -185,15 +180,11 @@ <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug aarch64|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
@@ -203,15 +194,11 @@ <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -225,15 +212,11 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -247,15 +230,11 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release aarch64|ARM'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -269,9 +248,6 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
- <Lib>
- <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
- </Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\source\compiler-core\slang-artifact-associated-impl.h" />
diff --git a/build/visual-studio/core/core.vcxproj b/build/visual-studio/core/core.vcxproj index 13e933326..0f567ee7e 100644 --- a/build/visual-studio/core/core.vcxproj +++ b/build/visual-studio/core/core.vcxproj @@ -157,7 +157,6 @@ <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -167,15 +166,11 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -185,15 +180,11 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug aarch64|ARM'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -203,15 +194,11 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -225,15 +212,11 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -247,15 +230,11 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release aarch64|ARM'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -269,9 +248,6 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> - <Lib> - <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors> - </Lib> </ItemDefinitionGroup> <ItemGroup> <ClInclude Include="..\..\..\source\core\slang-allocator.h" /> diff --git a/build/visual-studio/slang-rt/slang-rt.vcxproj b/build/visual-studio/slang-rt/slang-rt.vcxproj index 1c1190be2..023645e3b 100644 --- a/build/visual-studio/slang-rt/slang-rt.vcxproj +++ b/build/visual-studio/slang-rt/slang-rt.vcxproj @@ -163,7 +163,6 @@ <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -173,14 +172,12 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <ImportLibrary>..\..\..\bin\windows-x86\debug\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -190,14 +187,12 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <ImportLibrary>..\..\..\bin\windows-x64\debug\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug aarch64|ARM'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <Optimization>Disabled</Optimization> @@ -207,14 +202,12 @@ <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <ImportLibrary>..\..\..\bin\windows-aarch64\debug\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -228,14 +221,12 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <ImportLibrary>..\..\..\bin\windows-x86\release\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -249,14 +240,12 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <ImportLibrary>..\..\..\bin\windows-x64\release\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release aarch64|ARM'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Full</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -270,7 +259,6 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <ImportLibrary>..\..\..\bin\windows-aarch64\release\slang-rt.lib</ImportLibrary> - <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> </Link> </ItemDefinitionGroup> <ItemGroup> diff --git a/build/visual-studio/slang/slang.vcxproj b/build/visual-studio/slang/slang.vcxproj index ac8da5b89..8e4675262 100644 --- a/build/visual-studio/slang/slang.vcxproj +++ b/build/visual-studio/slang/slang.vcxproj @@ -163,7 +163,6 @@ <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;SLANG_ENABLE_IR_BREAK_ALLOC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -174,7 +173,6 @@ <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>..\..\..\bin\windows-x86\debug\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll ..\..\..\bin\windows-x86\debug > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll ..\..\..\bin\windows-x86\debug > nul)
@@ -185,7 +183,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x86\release\slang-glslang.d <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;SLANG_ENABLE_IR_BREAK_ALLOC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -196,7 +193,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x86\release\slang-glslang.d <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>..\..\..\bin\windows-x64\debug\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll ..\..\..\bin\windows-x64\debug > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll ..\..\..\bin\windows-x64\debug > nul)
@@ -207,7 +203,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x64\release\slang-glslang.d <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_DEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;SLANG_ENABLE_IR_BREAK_ALLOC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -218,7 +213,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x64\release\slang-glslang.d <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>..\..\..\bin\windows-aarch64\debug\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll ..\..\..\bin\windows-aarch64\debug > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll ..\..\..\bin\windows-aarch64\debug > nul)
@@ -229,7 +223,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
@@ -244,7 +237,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ImportLibrary>..\..\..\bin\windows-x86\release\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll ..\..\..\bin\windows-x86\release > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-x86\release\slang-llvm.dll ..\..\..\bin\windows-x86\release > nul)
@@ -255,7 +247,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x86\release\slang-glslang.d <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
@@ -270,7 +261,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x86\release\slang-glslang.d <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ImportLibrary>..\..\..\bin\windows-x64\release\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll ..\..\..\bin\windows-x64\release > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-x64\release\slang-llvm.dll ..\..\..\bin\windows-x64\release > nul)
@@ -281,7 +271,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x64\release\slang-glslang.d <ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;SLANG_DYNAMIC_EXPORT;SLANG_WITHOUT_EMBEDDED_STD_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\external\spirv-headers\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
@@ -296,7 +285,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-x64\release\slang-glslang.d <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ImportLibrary>..\..\..\bin\windows-aarch64\release\slang.lib</ImportLibrary>
- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
<PostBuildEvent>
<Command>IF EXIST ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll\ (xcopy /Q /E /Y /I ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll ..\..\..\bin\windows-aarch64\release > nul) ELSE (xcopy /Q /Y /I ..\..\..\external\slang-llvm\bin\windows-aarch64\release\slang-llvm.dll ..\..\..\bin\windows-aarch64\release > nul)
diff --git a/premake5.lua b/premake5.lua index 1ec0682ec..37e2900e4 100644 --- a/premake5.lua +++ b/premake5.lua @@ -315,13 +315,15 @@ newoption { -- Makes all symbols hidden by default unless explicitly 'exported' buildoptions { "-fvisibility=hidden" } -- Warnings - buildoptions { "-Wno-unused-but-set-variable", "-Wno-unused-parameter", "-Wno-type-limits", "-Wno-sign-compare", "-Wno-unused-variable", "-Wno-reorder", "-Wno-switch", "-Wno-return-type", "-Wno-unused-local-typedefs", "-Wno-parentheses", "-Wno-ignored-optimization-argument", "-Wno-unknown-warning-option", "-Wno-class-memaccess"} + buildoptions { "-Wno-unused-but-set-variable", "-Wno-unused-parameter", "-Wno-type-limits", "-Wno-sign-compare", "-Wno-unused-variable", "-Wno-switch", "-Wno-return-type", "-Wno-unused-local-typedefs", "-Wno-parentheses"} filter { "toolset:gcc*"} buildoptions { "-Wno-implicit-fallthrough" } - + filter { "toolset:gcc*", "language:C++"} + buildoptions { "-Wno-reorder" } + filter { "toolset:clang" } - buildoptions { "-Wno-deprecated-register", "-Wno-tautological-compare", "-Wno-missing-braces", "-Wno-undefined-var-template", "-Wno-unused-function", "-Wno-return-std-move"} + buildoptions { "-Wno-deprecated-register", "-Wno-tautological-compare", "-Wno-missing-braces", "-Wno-undefined-var-template", "-Wno-unused-function", "-Wno-return-std-move", "-Wno-ignored-optimization-argument", "-Wno-unknown-warning-option", "-Wno-class-memaccess", "-Wno-reorder"} -- When compiling the debug configuration, we want to turn -- optimization off, make sure debug symbols are output, @@ -756,7 +758,6 @@ newoption { -- keep our code free of warnings. -- warnings "Extra" - flags { "FatalWarnings" } if targetInfo.isWindows then addSourceDir "source/core/windows" @@ -778,7 +779,6 @@ newoption { -- keep our code free of warnings. -- warnings "Extra" - flags { "FatalWarnings" } if targetInfo.isWindows then addSourceDir "source/compiler-core/windows" @@ -792,7 +792,6 @@ standardProject("slang-rt", "source/slang-rt") pic "On" warnings "Extra" links {"miniz", "lz4"} - flags { "FatalWarnings" } defines { "SLANG_RT_DYNAMIC", "SLANG_RT_DYNAMIC_EXPORT" } addSourceDir "source/core" if targetInfo.isWindows then @@ -1337,7 +1336,6 @@ tool "slangd" kind "SharedLib" links { "core", "compiler-core", "miniz", "lz4"} warnings "Extra" - flags { "FatalWarnings" } pic "On" -- The way that we currently configure things through `slang.h`, |
