From 6c3fecf3d55a85c0df59b353fee9464f2875de7d Mon Sep 17 00:00:00 2001 From: Hennadiy Brych Date: Thu, 7 Dec 2023 09:07:17 -0500 Subject: [PATCH] cmake new policy under ifdef --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03c15e4..7593406 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.26) -# enable scan imports in 3.28 while supporting 3.26 -cmake_policy(SET CMP0155 NEW) +# enable scan imports in 3.28 while supporting 3.26, remove after all GitHub Actions runner images update to 3.28 +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.28.0") + cmake_policy(SET CMP0155 NEW) +endif() # project / version set(REDUMPER_PROJECT_NAME "redumper" CACHE STRING "Project name")