Skip to content

Commit

Permalink
Generate .pdb for Release target
Browse files Browse the repository at this point in the history
  • Loading branch information
nizikawa-worms committed Sep 15, 2022
1 parent 7c67f06 commit 7d90ea5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ add_library(${PROJECT_NAME} SHARED dllmain.cpp ${CMAKE_CURRENT_BINARY_DIR}/resou
target_link_libraries(${PROJECT_NAME} version)
set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND CMAKE_BUILD_TYPE MATCHES "Release")
target_compile_options(${PROJECT_NAME} PRIVATE /Zi)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_PDB_NAME ${PROJECT_NAME} COMPILE_PDB_OUTPUT_DIR ${CMAKE_BINARY_DIR})
endif()

0 comments on commit 7d90ea5

Please sign in to comment.