Skip to content

Commit

Permalink
[Ameba] Upgrade cpp17 (#28438)
Browse files Browse the repository at this point in the history
* 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 <andy314@gmail.com>
Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
3 people authored and pull[bot] committed Aug 9, 2023
1 parent f99c363 commit 2358201
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-ameba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-minimal-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/pigweed-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/pigweed-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
7 changes: 0 additions & 7 deletions src/app/chip_data_model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2358201

Please sign in to comment.