Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
Generate PDB files on CMake release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanpasu64 committed Aug 1, 2020
1 parent 7e8c0e5 commit 74b0c7e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME}
Dbghelp winmm comctl32 dsound dxguid Version)


# Generating .pdb files
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND CMAKE_BUILD_TYPE MATCHES "Release")
target_compile_options(${PROJECT_NAME} PRIVATE /Zi)

# Tell linker to include symbol data
set_target_properties(${PROJECT_NAME} PROPERTIES
LINK_FLAGS "/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF"
)

# Set file name & location
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_PDB_NAME ${PROJECT_NAME}
COMPILE_PDB_OUTPUT_DIR ${CMAKE_BINARY_DIR}
)
endif()


# 0CC-FamiTracker.rc includes res/0CC-FamiTracker.manifest.
# To prevent manifest linking errors:
# - res/0CC-FamiTracker.manifest MUST not be in add_executable().
Expand Down

0 comments on commit 74b0c7e

Please sign in to comment.