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"