From ac5e08be49ab662815859ef1029b757fa857ae2c Mon Sep 17 00:00:00 2001 From: Charles Zablit Date: Fri, 20 Nov 2026 19:02:07 +0000 Subject: [PATCH] [CMake] Require CMake 3.29 and drop the CMP0157 checks (#325) Follow-up to #324: require CMake 3.29 instead of checking for CMP0157, and leave `CMAKE_Swift_COMPILATION_MODE` to the caller. The toolchain build passes it (swiftlang/swift#94066). Tracking: swiftlang/swift#93995 assisted by Claude Co-authored-by: Cory Benfield --- .github/workflows/pull_request.yml | 1 + CMakeLists.txt | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a921ee3..369a682 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,6 +43,7 @@ jobs: name: Check cmake lists uses: apple/swift-nio/.github/workflows/cmake_tests.yml@main with: + cmake_version: "3.29.6" update_cmake_lists_config: >- { "targets": [ diff --git a/CMakeLists.txt b/CMakeLists.txt index e39fb78..722c27f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,19 +12,11 @@ ## ##===----------------------------------------------------------------------===## -cmake_minimum_required(VERSION 3.19) - -if(POLICY CMP0157) - cmake_policy(SET CMP0157 NEW) -endif() +cmake_minimum_required(VERSION 3.29) project(SwiftCertificates LANGUAGES Swift) -if(POLICY CMP0157 AND PROJECT_IS_TOP_LEVEL) - set(CMAKE_Swift_COMPILATION_MODE "$,wholemodule,incremental>") -endif() - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) include(SwiftSupport)