VS调试release程序

按如下设置vs工程属性:

cmake生成带调试信息的release工程

    set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -Od -Wall")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG:FULL /OPT:REF /OPT:ICF")
    set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /OPT:REF /OPT:ICF")
posted @ 2023-01-10 20:01  滴哒哒哒  阅读(106)  评论(0编辑  收藏  举报