From df1b5dd62c77696a0fed335a0e2158c6bb577db8 Mon Sep 17 00:00:00 2001
From: Marek Roszko <mark.roszko@gmail.com>
Date: Wed, 22 Jan 2025 19:41:34 -0500
Subject: [PATCH] Move 2 warn flags to same place as the rest

---
 CMakeLists.txt       | 4 ----
 cmake/Warnings.cmake | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ed80b3564..f4ec36fc37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,10 +526,6 @@ if( MSVC )
     add_compile_definitions( NOMINMAX )
     # source and execution charset are UTF-8
     string( APPEND CMAKE_CXX_FLAGS " /utf-8" )
-    # C4290: throw() is interpreted as declspec(nothrow)
-    string( APPEND CMAKE_CXX_FLAGS " /wd4290" )
-    # C4800: non-bool is explicitly cast to bool, forcing value of 0 or 1
-    string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
 
     # cmake 3.25 or higher requried for MSVC, should be fine
     if( USE_CCACHE AND CCACHE_FOUND )
diff --git a/cmake/Warnings.cmake b/cmake/Warnings.cmake
index eb1fd5d7f2..0b3432a5e4 100644
--- a/cmake/Warnings.cmake
+++ b/cmake/Warnings.cmake
@@ -274,4 +274,8 @@ if( MSVC )
     string( APPEND WARN_FLAGS_CXX " /wd5267" )
     # disable "reinterpret_cast used between related classes"
     string( APPEND WARN_FLAGS_CXX " /wd4946" )
+    # disable throw() is interpreted as declspec(nothrow)
+    string( APPEND WARN_FLAGS_CXX " /wd4290" )
+    # disable non-bool is explicitly cast to bool, forcing value of 0 or 1
+    string( APPEND WARN_FLAGS_CXX " /wd4800" )
 endif()