diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index a472c5b7a9..55cd58cd7e 100755 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -50,6 +50,12 @@ option(HIP_OFFICIAL_BUILD "Enable/Disable for mainline/staging builds" OFF) if(NOT ENABLE_ASAN_PACKAGING) option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" ON) endif() + +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL") +endif() + set(HIPCC_BIN_DIR "" CACHE STRING "HIPCC and HIPCONFIG binary directories") if(__HIP_ENABLE_PCH) diff --git a/projects/clr/opencl/CMakeLists.txt b/projects/clr/opencl/CMakeLists.txt index bb3324a6b5..bd5e6a97a4 100644 --- a/projects/clr/opencl/CMakeLists.txt +++ b/projects/clr/opencl/CMakeLists.txt @@ -22,6 +22,12 @@ if(NOT ENABLE_ASAN_PACKAGING) option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward compatibility" ON) endif() +# Add flags to generate PDB files with full symbolic information +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL") +endif() + set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "") if(BUILD_ICD) add_subdirectory(khronos/icd)