From 890fd0ba3accc54b98bfa6a510bb49ee5500a733 Mon Sep 17 00:00:00 2001 From: mitras-git Date: Sun, 12 Jul 2026 14:06:23 -0400 Subject: [PATCH] add CMake configurations for Sources targets --- Sources/CMakeLists.txt | 2 ++ Sources/InMemoryLogging/CMakeLists.txt | 17 +++++++++++++++++ Sources/Logging/CMakeLists.txt | 25 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 Sources/CMakeLists.txt create mode 100644 Sources/InMemoryLogging/CMakeLists.txt create mode 100644 Sources/Logging/CMakeLists.txt diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt new file mode 100644 index 0000000..9eb9a5e --- /dev/null +++ b/Sources/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(Logging) +add_subdirectory(InMemoryLogging) diff --git a/Sources/InMemoryLogging/CMakeLists.txt b/Sources/InMemoryLogging/CMakeLists.txt new file mode 100644 index 0000000..99ba4f2 --- /dev/null +++ b/Sources/InMemoryLogging/CMakeLists.txt @@ -0,0 +1,17 @@ +add_library(InMemoryLogging + InMemoryLogHandler.swift) + +set_target_properties(InMemoryLogging PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +target_compile_options(InMemoryLogging PRIVATE + -enable-upcoming-feature ExistentialAny + -enable-upcoming-feature MemberImportVisibility + -enable-upcoming-feature InternalImportsByDefault + -enable-upcoming-feature NonisolatedNonsendingByDefault + -Xfrontend -require-explicit-sendable) + +target_link_libraries(InMemoryLogging PRIVATE Logging) + +_install_target(InMemoryLogging) +set_property(GLOBAL APPEND PROPERTY SwiftLog_EXPORTS InMemoryLogging) diff --git a/Sources/Logging/CMakeLists.txt b/Sources/Logging/CMakeLists.txt new file mode 100644 index 0000000..bb6fd08 --- /dev/null +++ b/Sources/Logging/CMakeLists.txt @@ -0,0 +1,25 @@ +add_library(Logging + Locks.swift + LogEvent.swift + LogHandler.swift + Logger+Attributes.swift + Logger+With.swift + Logger.swift + LoggingSystem.swift + MetadataProvider.swift + Handlers/MultiplexLogHandler.swift + Handlers/StreamLogHandler.swift + Handlers/SwiftLogNoOpLogHandler.swift) + +set_target_properties(Logging PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +target_compile_options(Logging PRIVATE + -enable-upcoming-feature ExistentialAny + -enable-upcoming-feature MemberImportVisibility + -enable-upcoming-feature InternalImportsByDefault + -enable-upcoming-feature NonisolatedNonsendingByDefault + -Xfrontend -require-explicit-sendable) + +_install_target(Logging) +set_property(GLOBAL APPEND PROPERTY SwiftLog_EXPORTS Logging)