From 4aff09248e8c79053a41400413900fd32856fdcf Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 21 May 2025 17:16:09 +0100 Subject: [PATCH] Build using whole program optimization on MSVC --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b0d3869..674bbcda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() ##############################