diff --git a/CMakeLists.txt b/CMakeLists.txt index d622f96..c211d9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -633,9 +633,12 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endforeach() endif() - set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4571" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4711" "/wd4751" "/wd4774" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219") + set(WarningsEXE /wd4061 /wd4062 /wd4365 /wd4514 /wd4571 /wd4625 /wd4626 /wd4627 /wd4668 /wd4710 /wd4711 /wd4751 /wd4774 /wd4820 /wd5026 /wd5027 /wd5039 /wd5045 /wd5219) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34) - list(APPEND WarningsEXE "/wd5262" "/wd5264") + list(APPEND WarningsEXE /wd5262 /wd5264) + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.50) + list(APPEND WarningsEXE /wd4865) endif() foreach(t IN LISTS TOOL_EXES) target_compile_options(${t} PRIVATE ${WarningsEXE}) diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index 6e930be..951a3a7 100644 --- a/DirectXTex/DirectXTexP.h +++ b/DirectXTex/DirectXTexP.h @@ -13,7 +13,7 @@ #ifdef _MSC_VER // Off by default warnings -#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045 5219 5246 5264 26812) +#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4865 4987 5026 5027 5031 5032 5039 5045 5219 5246 5264 26812) // C4619/4616 #pragma warning warnings // C4061 enumerator 'X' in switch of enum 'X' is not explicitly handled by a case label // C4265 class has virtual functions, but destructor is not virtual @@ -29,6 +29,7 @@ // C4746 volatile access of '' is subject to /volatile: setting // C4774 format string expected in argument 3 is not a string literal // C4820 padding added after data member +// C4865 the underlying type will change from 'int' to 'unsigned int' when '/Zc:enumTypes' is specified on the command line // C4987 nonstandard extension used // C5026 move constructor was implicitly defined as deleted // C5027 move assignment operator was implicitly defined as deleted diff --git a/build/CompilerAndLinker.cmake b/build/CompilerAndLinker.cmake index 50f1622..c2220f5 100644 --- a/build/CompilerAndLinker.cmake +++ b/build/CompilerAndLinker.cmake @@ -193,7 +193,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() if(WINDOWS_STORE AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.32)) - list(APPEND COMPILER_SWITCHES "/wd5246") + list(APPEND COMPILER_SWITCHES /wd5246) endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.35)