MSVC: Generate debug information for release builds (#4674)
authorSmallJoker <SmallJoker@users.noreply.github.com>
Sun, 6 Nov 2016 16:14:36 +0000 (17:14 +0100)
committerkwolekr <kwolekr@minetest.net>
Sun, 6 Nov 2016 16:14:36 +0000 (11:14 -0500)
Replace parameters with the equivalent /Ox

src/CMakeLists.txt

index 3eda27953f19bb35f170295db83863b2ee5e6813..cb04c9425fb33810306ca13e4338112a7567bd8d 100644 (file)
@@ -696,9 +696,9 @@ if(MSVC)
        # Visual Studio
 
        # EHa enables SEH exceptions (used for catching segfaults)
-       set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /Ob2 /Oi /Ot /Oy /GL /FD /MT /GS- /arch:SSE /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0 /TP")
+       set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /GL /FD /MT /GS- /Zi /arch:SSE /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0 /TP")
        #set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /NODEFAULTLIB:\"libcmtd.lib\" /NODEFAULTLIB:\"libcmt.lib\"")
-       set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG")
+       set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /DEBUG /OPT:REF /OPT:ICF")
 
        set(CMAKE_CXX_FLAGS_SEMIDEBUG "/MDd /Zi /Ob0 /O1 /RTC1")