Skip to content

Commit

Permalink
Merge pull request #13 from vdsrd/hunter
Browse files Browse the repository at this point in the history
Installing pdb files also in release build.
  • Loading branch information
ruslo authored Sep 14, 2017
2 parents e54b4e2 + 33db5b4 commit b92c2f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions googletest/cmake/internal_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,22 @@ endfunction()
macro( install_pdb_files target )
if(MSVC AND NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0) # COMPILE_PDB_... properties where introduced with cmake 3.1
set(debugOutputDir ${PROJECT_BINARY_DIR}/Debug)
set(releaseOutputDir ${PROJECT_BINARY_DIR}/Release)
# make sure the compiler generated .pdb files are palced besides the .lib files
if(NOT BUILD_SHARED_LIBS)
set_target_properties( ${target} PROPERTIES COMPILE_PDB_NAME_DEBUG ${target}d COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG ${debugOutputDir} )
set_target_properties( ${target} PROPERTIES COMPILE_PDB_NAME_RELEASE ${target} COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE ${releaseOutputDir} )
endif()
install(
FILES ${debugOutputDir}/${target}d.pdb
DESTINATION "lib"
CONFIGURATIONS Debug
)
install(
FILES ${releaseOutputDir}/${target}.pdb
DESTINATION "lib"
CONFIGURATIONS Release
)
endif()
endmacro()

Expand Down

0 comments on commit b92c2f2

Please sign in to comment.