Files
CMake/Tests/RunCMake/Swift/CompileCommands.cmake
Evan Wilde 44f29a4291 Swift/Ninja: Fix multifile module compile commands
Swift compile commands need to have all source files in the module
specified in the compile command or LSP systems will report errors on
missing types that are defined in other source files in the same module.

Issue: #25491
2024-01-03 14:57:46 -08:00

10 lines
265 B
CMake

if(POLICY CMP0157)
cmake_policy(SET CMP0157 NEW)
endif()
set(CMAKE_Swift_COMPILATION_MODE "singlefile")
enable_language(Swift)
add_library(CompileCommandLib STATIC E.swift L.swift)
set_target_properties(CompileCommandLib PROPERTIES EXPORT_COMPILE_COMMANDS YES)