diff --git a/CMakeLists.txt b/CMakeLists.txt index e9c3d37..801aede 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,6 +299,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() set(WarningsEXE "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd4061" "/wd4062" "/wd5219") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34) + list(APPEND WarningsEXE "/wd5262" "/wd5264") + target_compile_options(${PROJECT_NAME} PRIVATE "/wd5262") + endif() + foreach(t IN LISTS TOOL_EXES) target_compile_options(${t} PRIVATE ${WarningsEXE}) endforeach() diff --git a/UVAtlas/pch.h b/UVAtlas/pch.h index 27579e4..a92aa3e 100644 --- a/UVAtlas/pch.h +++ b/UVAtlas/pch.h @@ -10,7 +10,7 @@ #pragma once // Off by default warnings -#pragma warning(disable : 4619 4616 4061 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4820 4987 5026 5027 5031 5032 5039 5045 26451 26812) +#pragma warning(disable : 4619 4616 4061 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4820 4987 5026 5027 5031 5032 5039 5045 5264 26451 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 @@ -30,6 +30,7 @@ // C5031/5032 push/pop mismatches in windows headers // C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc // C5045 Spectre mitigation warning +// C5264 'const' variable is not used // 26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. // 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).