mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-30 19:57:41 +00:00
Swift supports CodeView/PDB for Windows (with active development ongoing to make it the default). It is currently usable but does not have the same fidelity as DWARF, but can be sufficient for many use cases. The user is able to control this via flags. Wire up the necessary support to allow `TARGET_PDB_FILE` to be used with Swift/Swift-only targets.
13 lines
370 B
CMake
13 lines
370 B
CMake
cmake_policy(SET CMP0157 NEW)
|
|
|
|
enable_language(Swift)
|
|
|
|
add_executable(SwiftPDBDwarf E.swift)
|
|
set_property(TARGET SwiftPDBDwarf PROPERTY LINKER_TYPE LLD)
|
|
target_compile_options(SwiftPDBDwarf PRIVATE -g -debug-info-format=dwarf)
|
|
target_link_options(SwiftPDBDwarf PRIVATE LINKER:-debug:dwarf)
|
|
|
|
install(FILES "$<TARGET_PDB_FILE:SwiftPDBDwarf>"
|
|
DESTINATION bin
|
|
OPTIONAL)
|