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