From 178782481a65e06dda25cd05e891671671a5dba5 Mon Sep 17 00:00:00 2001 From: mitras-git Date: Tue, 14 Jul 2026 18:27:09 -0400 Subject: [PATCH] enforce minimum Swift compiler version of 6.1 in CMake --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f18da47..f8f4f38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,10 @@ option(BUILD_SHARED_LIBS "Build shared libraries by default" YES) set(CMAKE_Swift_LANGUAGE_VERSION 6) +if(CMAKE_Swift_COMPILER_VERSION VERSION_LESS "6.1") + message(FATAL_ERROR "swift-log requires Swift compiler version 6.1 or newer. Detected version: ${CMAKE_Swift_COMPILER_VERSION}") +endif() + set(SWIFT_LOG_COMMON_COMPILE_OPTIONS "SHELL:-enable-upcoming-feature ExistentialAny" "SHELL:-enable-upcoming-feature MemberImportVisibility"