Skip to content

Commit 5b280f6

Browse files
Install PDBs (#169)
* Install PDBs * Fix PDB install for non-MSVC toolchains
1 parent eaf36a6 commit 5b280f6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ install(
166166
LIBRARY
167167
DESTINATION ${CMAKE_INSTALL_LIBDIR} # obtained from GNUInstallDirs
168168
)
169+
install(
170+
# FILES $<TARGET_PDB_FILE:OpenCL> is cleanest, but is MSVC link.exe specific. LLVM's lld.exe and lld-link.exe don't support it (configure-time error)
171+
# FILES $<TARGET_PROPERTY:OpenCL,COMPILE_PDB_OUTPUT_DIRECTORY>/OpenCL.pdb looks OK, but even though there's a PDB, this prop is empty on non-MSVC toolchains
172+
FILES $<TARGET_FILE_DIR:OpenCL>/OpenCL.pdb # is the most implicit (expect PDB be next to the library), yet the only one that universally works
173+
DESTINATION ${CMAKE_INSTALL_BINDIR}
174+
OPTIONAL
175+
)
169176

170177
export(
171178
EXPORT OpenCLICDLoaderTargets

0 commit comments

Comments
 (0)