From 3c802692e9cba1aa17b4249391093b52df073cb3 Mon Sep 17 00:00:00 2001 From: Kangping Dong Date: Mon, 15 Apr 2024 22:39:31 +0800 Subject: [PATCH] update cmake to 3.20.1 --- .github/workflows/build.yml | 8 ++++---- CMakeLists.txt | 2 +- android/build-commissioner-libs.sh | 6 ++++++ script/bootstrap.sh | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1c7e900..4a5532ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,11 +60,11 @@ jobs: gcc_ver: [5, 6, 7, 8, 9, 10] steps: - uses: actions/checkout@v3 - - name: Install CMake 3.10.1 + - name: Install CMake 3.20.1 run: | - wget https://cmake.org/files/v3.10/cmake-3.10.1.zip - unzip cmake-3.10.1 - cd cmake-3.10.1 + wget https://cmake.org/files/v3.20/cmake-3.20.1.zip + unzip cmake-3.20.1 + cd cmake-3.20.1 cmake . make -j4 sudo make install diff --git a/CMakeLists.txt b/CMakeLists.txt index 0efc6f2a..ade3f02f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -cmake_minimum_required(VERSION 3.10.1) +cmake_minimum_required(VERSION 3.20.1) project(ot-commissioner VERSION 0.2.0) option(OT_COMM_ANDROID "Build with Android NDK" OFF) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index b5bd6405..00819799 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -46,6 +46,12 @@ cd "${CUR_DIR}" readonly BUILD_DIR=".build-$ANDROID_ABI" mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR" + +# Sometimes the java binding will not be rebuilt even of commissioner.hpp is updated. +# This will enforce rebuilding of the java binding in case the commissioner API is changed. +# Don't need this when https://github.com/openthread/ot-commissioner/pull/262 is merged +rm -rf src/java + cmake -GNinja \ -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME"/build/cmake/android.toolchain.cmake \ -DANDROID_ABI="$ANDROID_ABI" \ diff --git a/script/bootstrap.sh b/script/bootstrap.sh index c0209d05..c44c919b 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -31,7 +31,7 @@ set -e # Bootstrap with CCM dependencies. readonly WITH_CCM="${WITH_CCM:-1}" -readonly MIN_CMAKE_VERSION="3.10.1" +readonly MIN_CMAKE_VERSION="3.20.1" ## Match the version to see if current version is greater than or euqal to required version. ## Args: $1 current version