From 3c7e583f6dfebe2d6ba9abb970d7c869d407b25b Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 7 Apr 2025 12:19:02 +0100 Subject: [PATCH] Suppress MSVC warnings C4711 and C5045 during compilation --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3cbed5a9..8c65c59ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,13 @@ else() set(IS_RELEASE_BUILD ON) endif() +if (MSVC) + add_compile_options( + /wd4711 # Suppresses `function 'xxxxx' selected for automatic inline expansion` messages + /wd5045 # Suppresses `Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified` messages + ) +endif() + # LTO takes too much memory and time using MSVC. if (NOT MSVC AND IS_RELEASE_BUILD) set(DEFAULT_ENABLE_LTO ON)