From 65de2491b562ab92d31d6e987ce9dcc2bee35d7d Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:25:58 +0900 Subject: [PATCH] [Build] Include .pdb files with Release target --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f0e96c08..dc8defe7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,10 @@ if(MSVC) add_compile_definitions($<$:_NO_DEBUG_HEAP=1>) add_compile_options($<$:/Gw>) add_compile_options($<$:/GS->) # NoBufferSecurityCheck + add_compile_options($<$:/Zi>) # Generate PDB debug info + add_link_options($<$:/DEBUG>) # Emit .pdb for the linked binary + add_link_options($<$:/OPT:REF>) # Remove unreferenced functions/data + add_link_options($<$:/OPT:ICF>) # Fold identical COMDATs # Replace /Ob2 with /Ob3 in CMake's default Release flags string(REPLACE "/Ob2" "/Ob3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "/Ob2" "/Ob3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")