From 4bb82c8228ed8f772f75ea320db25b0eed4f48e3 Mon Sep 17 00:00:00 2001 From: Kang Lin Date: Thu, 29 Aug 2024 09:15:01 +0800 Subject: [PATCH] Fix compile fail with android ndk 27 Compile error information: CMake Warning (dev) at /data/android-sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if): Policy CMP0057 is not set: Support new IN_LIST if() operator. Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IN_LIST will be interpreted as an operator when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include) /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/Platform/Android-Clang-C.cmake:1 (include) /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:4 (project) This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at /data/android-sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if): if given arguments: "hwaddress" "IN_LIST" "ANDROID_SANITIZE" Unknown arguments specified Call Stack (most recent call first): /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include) /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/Platform/Android-Clang-C.cmake:1 (include) /home/l/Downloads/cmake-3.30.2/share/cmake-3.30/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:4 (project) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36a6cb57..13b02175 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.6.0) project(cJSON VERSION 1.7.18