mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
LLVM's CMake modules include a function `llvm_process_sources()`, which (among other things) verifies that all source files in a directory are either included in the list of source files to process, or are included in a list `LLVM_OPTIONAL_SOURCES`. SourceKit's CMake functions make use of this LLVM function, but do not register any files as "optional". When attempting to configure CMake to include SourceKit on a Linux host machine, source files that are only included on Darwin host machines cause this function to raise an error. Mark Darwin-only SourceKit files as "optional" to avoid the error.