Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/TestingMacros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ if(SwiftTesting_BuildMacrosAsExecutables)

install(TARGETS TestingMacros
RUNTIME DESTINATION bin)
if(MSVC)
install(FILES $<TARGET_FILE_DIR:TestingMacros>/$<TARGET_FILE_BASE_NAME:TestingMacros>.pdb
DESTINATION bin
OPTIONAL)
endif()
else()
add_library(TestingMacros SHARED)

Expand All @@ -79,6 +84,11 @@ else()
install(TARGETS TestingMacros
LIBRARY DESTINATION "${plugin_destination_dir}"
RUNTIME DESTINATION bin)
if(MSVC)
install(FILES $<TARGET_FILE_DIR:TestingMacros>/$<TARGET_FILE_BASE_NAME:TestingMacros>.pdb
DESTINATION bin
OPTIONAL)
endif()
endif()

target_sources(TestingMacros PRIVATE
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/SwiftModuleInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ function(_swift_testing_install_target module)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

get_target_property(type ${module} TYPE)
if(MSVC AND NOT type STREQUAL STATIC_LIBRARY)
install(FILES $<TARGET_FILE_DIR:${module}>/$<TARGET_FILE_BASE_NAME:${module}>.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
OPTIONAL)
endif()
if(type STREQUAL EXECUTABLE)
return()
endif()
Expand Down
Loading