how to generate pdb files for Release build with cmake flags?
问题 I am generating a visual studio solution using cmake. And now I want to generate pdb files for a Release build. (Why? because I want to have the symbols in case that the user found some bug) I tried by setting the following flags without succeed: set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "Build Types" FORCE) IF(WIN32) set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/Release") set( CMAKE_EXE_LINKER_FLAGS_RELEASE "/debug /INCREMENTAL") set( CMAKE_SHARED