From aa58dd5f680e205041fc51ff311efb9264ed78b5 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 55a60fd43..63582893e 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)