From a51a3322feb99494e93ae7800ab4a5796d46b770 Mon Sep 17 00:00:00 2001 From: Guan-t7 Date: Thu, 2 Nov 2023 08:46:49 -0700 Subject: [PATCH] Fix CMakeLists.txt for older cmake --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 746f036..03b3d73 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.5) project(needle C CXX) -cmake_policy(SET CMP0146 OLD) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27") + cmake_policy(SET CMP0146 OLD) +endif() # find correct version of Python execute_process(COMMAND python3-config --prefix