Build using whole program optimization on MSVC

This commit is contained in:
Oliver Hamlet
2025-06-07 10:28:29 +01:00
parent 54c3f1a485
commit 4aff09248e
+5 -2
View File
@@ -362,8 +362,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif()
if(MSVC)
# Turn off permissive mode to be more standards-compliant and avoid compiler errors.
target_compile_options(loot PRIVATE "/Zc:__cplusplus" "/permissive-" "/W4")
target_compile_options(loot PRIVATE
"/Zc:__cplusplus"
"/permissive-"
"/W4"
"/GL")
endif()
##############################