mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-24 07:28:54 -06:00
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
10 lines
265 B
CMake
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)
|