From 2358201becf5f44d35261879049e816eaf136466 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 4 Aug 2023 22:40:10 +0800 Subject: [PATCH] [Ameba] Upgrade cpp17 (#28438) * fix cmake workaround for ameba - upgrade pigweed app to c++17 * Update Dockerfile * Update version * Move to chip-build-ameba version 4 instead of 1, to suppor c++17 --------- Co-authored-by: Andrei Litvin Co-authored-by: Andrei Litvin --- .github/workflows/examples-ameba.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 ++-- examples/all-clusters-minimal-app/ameba/README.md | 4 ++-- examples/light-switch-app/ameba/README.md | 4 ++-- examples/lighting-app/ameba/README.md | 4 ++-- examples/ota-requestor-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/chip_main.cmake | 4 ++-- src/app/chip_data_model.cmake | 7 ------- 9 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c4c164f880cd0c..5ccb16bfab073a 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:1 + image: ghcr.io/project-chip/chip-build-ameba:4 options: --user root steps: diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index d02447ebfb6330..cb07a50deba7e1 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 21d7c94f4859f0..f4ae242ea0aa05 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 03ee7caacb0447..8c45c2ee225d0c 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index bd764b23558643..8297c2a3bb2dbc 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index cb175df24d9116..534db2f8b18b62 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 77ea1e196429f7..4f6ed1830b6cce 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index e18ecb62bdf48c..1f0db465a6878b 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -100,9 +100,9 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++17 + -std=c++17 -fno-rtti - -fno-use-cxa-atexit + -fno-use-cxa-atexit ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 8f0f7f82301cfc..63ebf1b4ef1eee 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -16,13 +16,6 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) -if (NOT CHIP_ROOT) - # TODO: these are WORKAROUNDS and should be removed - if(DEFINED ameba_matter_root) - SET(CHIP_ROOT "${ameba_matter_root}") - endif() -endif() - include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster