From 33bc96fcce1a07712e8d2a7d8b5f84ae178f130e Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 21 Feb 2022 10:36:36 +0100 Subject: [PATCH] CMake: disable unscoped enum type warning C26812 for msvc compilers --- cmake/compiler/msvc/settings.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 162ca87dd33..3cdda8893f6 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -105,8 +105,9 @@ message(STATUS "MSVC: Disabled POSIX warnings") # Ignore specific warnings target_compile_options(trinity-compile-option-interface INTERFACE - /wd4351 # C4351: new behavior: elements of array 'x' will be default initialized - /wd4091) # C4091: 'typedef ': ignored on left of '' when no variable is declared + /wd4351 # C4351: new behavior: elements of array 'x' will be default initialized + /wd4091 # C4091: 'typedef ': ignored on left of '' when no variable is declared + /wd26812) # C26812: The enum type 'type-name' is unscoped. Prefer enum class over enum if(NOT WITH_WARNINGS) target_compile_options(trinity-compile-option-interface