Suppress MSVC warnings C4711 and C5045 during compilation

This commit is contained in:
OpenSauce04 2025-04-07 12:19:02 +01:00 committed by OpenSauce
parent 9500859043
commit aa58dd5f68

View file

@ -54,6 +54,13 @@ else()
set(IS_RELEASE_BUILD ON) set(IS_RELEASE_BUILD ON)
endif() 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. # LTO takes too much memory and time using MSVC.
if (NOT MSVC AND IS_RELEASE_BUILD) if (NOT MSVC AND IS_RELEASE_BUILD)
set(DEFAULT_ENABLE_LTO ON) set(DEFAULT_ENABLE_LTO ON)