This commit is contained in:
Chuck Walbourn 2022-10-17 18:29:08 -07:00
Родитель 3dcfbab1d8
Коммит da8a01f14a
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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()

Просмотреть файл

@ -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