msvc: silence warning in qt header

This commit is contained in:
Shawn Hoffman 2022-07-28 13:11:34 -07:00
parent bdf3a03c04
commit ec9b30681b
2 changed files with 6 additions and 0 deletions

View File

@ -396,6 +396,9 @@ if (MSVC)
target_compile_options(dolphin-emu PRIVATE "${qtGuiPriv}")
target_compile_options(dolphin-emu PRIVATE "${qtWidgets}")
# Qt 6.3.0 headers use std::aligned_storage instead of alignas
target_compile_definitions(dolphin-emu PRIVATE _SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING)
if ("${QT_VERSION_MAJOR}" GREATER_EQUAL 6)
# Qt6 requires RTTI
remove_cxx_flag_from_target(dolphin-emu "/GR-")

View File

@ -31,6 +31,9 @@
<AdditionalIncludeDirectories>$(ProjectDir)TAS;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)VideoInterface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<!--Qt 6.3.0 headers use std::aligned_storage instead of alignas-->
<PreprocessorDefinitions>_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--Jump through some hoops to generate a pch file local to this project-->
<AdditionalIncludeDirectories>$(SourceDir)PCH;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader>