diff --git a/CMakeLists.txt b/CMakeLists.txt index 39f09c4..3ee3dbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,6 +258,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() set(WarningsEXE "/wd4061" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34) + list(APPEND WarningsEXE "/wd5262" "/wd5264") + endif() foreach(t IN LISTS TOOL_EXES) target_compile_options(${t} PRIVATE ${WarningsEXE}) endforeach() diff --git a/DirectXMesh/DirectXMeshP.h b/DirectXMesh/DirectXMeshP.h index cc1e114..495b4a9 100644 --- a/DirectXMesh/DirectXMeshP.h +++ b/DirectXMesh/DirectXMeshP.h @@ -12,7 +12,7 @@ #pragma once // Off by default warnings -#pragma warning(disable : 4619 4616 4061 4365 4514 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045 5219 5246 26812) +#pragma warning(disable : 4619 4616 4061 4365 4514 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 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 // C4365 signed/unsigned mismatch @@ -36,6 +36,7 @@ // C5045 Spectre mitigation warning // C5219 implicit conversion from 'int' to 'float', possible loss of data // C5246 the initialization of a subobject should be wrapped in braces +// C5264 'const' variable is not used // 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). // Windows 8.1 SDK related Off by default warnings