From e83b75cdd828484a3a26fab556ddea0eaaf3af72 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Mon, 15 Jul 2024 12:10:43 +0200 Subject: [PATCH] optimize windows for size --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f1d0c0..6cbc2a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,9 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() + + # remove unreferenced objects, significantly reducing binary and debugsymbol sizes + add_link_options("/OPT:REF") endif() # cmake setup end