按如下设置vs工程属性:
![](/i/l/?n=23&i=blog/2166776/202301/2166776-20230110195147960-410959970.jpg)
![](/i/l/?n=23&i=blog/2166776/202301/2166776-20230110195152713-955490202.jpg)
![](/i/l/?n=23&i=blog/2166776/202301/2166776-20230110195233338-477911045.jpg)
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")
标签:set,CMAKE,CXX,LINKER,RELEASE,VS,FLAGS,release,调试
From: https://www.cnblogs.com/mmmmmmmmm/p/17041265.html