From 9482939215560c09fc132e2bb2297cc266c9cbb1 Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Thu, 13 Mar 2025 18:16:11 +0100 Subject: [PATCH] Remove gnu Signed-off-by: Adrian Gielniewski --- build/config/compiler/compiler.gni | 4 +-- config/common/cmake/chip_gn_args.cmake | 6 ++-- config/mbed/CMakeLists.txt | 4 +-- config/nrfconnect/app/enable-gnu-std.cmake | 5 --- config/nrfconnect/chip-module/CMakeLists.txt | 2 -- config/nxp/app/enable-gnu-std.cmake | 22 ------------- config/nxp/chip-module/CMakeLists.txt | 2 -- config/qpg/lib/pw_rpc/BUILD.gn | 8 ++--- config/telink/app/enable-gnu-std.cmake | 6 ---- config/telink/chip-module/CMakeLists.txt | 2 -- config/zephyr/app/enable-gnu-std.cmake | 6 ---- config/zephyr/chip-module/CMakeLists.txt | 2 -- config/zephyr/zephyr-util.cmake | 20 ------------ .../telink/CMakeLists.txt | 1 - .../all-clusters-app/esp32/CMakeLists.txt | 2 +- .../nrfconnect/CMakeLists.txt | 1 - .../nxp/zephyr/CMakeLists.txt | 1 - .../all-clusters-app/telink/CMakeLists.txt | 1 - .../esp32/CMakeLists.txt | 2 +- .../nrfconnect/CMakeLists.txt | 1 - .../telink/CMakeLists.txt | 1 - examples/bridge-app/esp32/CMakeLists.txt | 2 +- examples/bridge-app/telink/CMakeLists.txt | 1 - examples/chef/esp32/CMakeLists.txt | 2 +- examples/chef/nrfconnect/CMakeLists.txt | 1 - examples/chef/telink/CMakeLists.txt | 1 - .../contact-sensor-app/telink/CMakeLists.txt | 1 - .../esp32/CMakeLists.txt | 2 +- .../nxp/zephyr/CMakeLists.txt | 1 - .../light-switch-app/esp32/CMakeLists.txt | 2 +- .../nrfconnect/CMakeLists.txt | 1 - .../light-switch-app/telink/CMakeLists.txt | 1 - examples/lighting-app/esp32/CMakeLists.txt | 2 +- .../lighting-app/nrfconnect/CMakeLists.txt | 1 - .../lighting-app/nxp/k32w1/with_pw_rpc.gni | 2 +- .../lighting-app/nxp/mcxw71/with_pw_rpc.gni | 2 +- examples/lighting-app/telink/CMakeLists.txt | 1 - examples/lit-icd-app/esp32/CMakeLists.txt | 2 +- .../lit-icd-app/nrfconnect/CMakeLists.txt | 1 - examples/lock-app/esp32/CMakeLists.txt | 2 +- examples/lock-app/nrfconnect/CMakeLists.txt | 1 - examples/lock-app/telink/CMakeLists.txt | 1 - .../ota-provider-app/esp32/CMakeLists.txt | 2 +- .../ota-requestor-app/esp32/CMakeLists.txt | 2 +- .../ota-requestor-app/telink/CMakeLists.txt | 1 - .../persistent-storage/esp32/CMakeLists.txt | 2 +- examples/pigweed-app/esp32/CMakeLists.txt | 2 +- examples/pump-app/nrfconnect/CMakeLists.txt | 1 - examples/pump-app/telink/CMakeLists.txt | 1 - .../nrfconnect/CMakeLists.txt | 1 - .../pump-controller-app/telink/CMakeLists.txt | 1 - examples/shell/esp32/CMakeLists.txt | 2 +- examples/shell/nrfconnect/CMakeLists.txt | 2 -- examples/shell/telink/CMakeLists.txt | 1 - .../smoke-co-alarm-app/telink/CMakeLists.txt | 1 - .../esp32/CMakeLists.txt | 2 +- .../telink/CMakeLists.txt | 1 - examples/thermostat/nxp/zephyr/CMakeLists.txt | 1 - examples/thermostat/telink/CMakeLists.txt | 1 - examples/thread-br-app/esp32/CMakeLists.txt | 2 +- .../project.pbxproj | 8 ++--- .../TvCasting.xcodeproj/project.pbxproj | 8 ++--- examples/window-app/nrfconnect/CMakeLists.txt | 1 - examples/window-app/telink/CMakeLists.txt | 1 - .../tests/expected_test_cmakelists.txt | 8 ++--- scripts/examples/tests/test_project.json | 32 +++++++++---------- .../CHIPTool.xcodeproj/project.pbxproj | 8 ++--- .../Matter.xcodeproj/project.pbxproj | 12 +++---- src/test_driver/esp32/CMakeLists.txt | 2 +- .../ti_simplelink_sdk/ti_simplelink_sdk.gni | 2 +- 70 files changed, 69 insertions(+), 168 deletions(-) delete mode 100644 config/nrfconnect/app/enable-gnu-std.cmake delete mode 100644 config/nxp/app/enable-gnu-std.cmake delete mode 100644 config/telink/app/enable-gnu-std.cmake delete mode 100644 config/zephyr/app/enable-gnu-std.cmake diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 63b1840bc884d2..05842300f40035 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -40,10 +40,10 @@ declare_args() { exclude_unwind_tables = current_os != "android" # C standard level (value for -std flag). - c_standard = "gnu11" + c_standard = "c11" # C++ standard level (value for -std flag). - cpp_standard = "gnu++17" + cpp_standard = "c++17" # enable libfuzzer is_libfuzzer = false diff --git a/config/common/cmake/chip_gn_args.cmake b/config/common/cmake/chip_gn_args.cmake index 7d86d1fb433fdf..946593e4e4bc5f 100644 --- a/config/common/cmake/chip_gn_args.cmake +++ b/config/common/cmake/chip_gn_args.cmake @@ -124,11 +124,11 @@ macro(matter_add_cxxflags flags) list(APPEND MATTER_CFLAGS_CC ${flags}) endmacro() -# Add GNU CPP standard flag to Matter CXX compiler flags +# Add CPP standard flag to Matter CXX compiler flags # [Args]: # std_version - standard version number e.g. 17 for C++17 -macro(matter_add_gnu_cpp_standard std_version) - list(APPEND MATTER_CFLAGS_CC -std=gnu++${std_version}) +macro(matter_add_cpp_standard std_version) + list(APPEND MATTER_CFLAGS_CC -std=c++${std_version}) endmacro() # Get compiler flags from listed targets. diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 88567b604e3254..962a647f2ecf38 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -106,7 +106,7 @@ matter_get_compiler_flags_from_targets("${CONFIG_CHIP_EXTERNAL_TARGETS}") matter_add_flags(-D__LINUX_ERRNO_EXTENSIONS__=1) matter_add_flags(-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=) -matter_add_gnu_cpp_standard("17") +matter_add_cpp_standard("17") if (CONFIG_MBED_BSD_SOCKET_TRACE) matter_add_flags(-DMBED_BSD_SOCKET_TRACE=1) @@ -186,7 +186,7 @@ if (CONFIG_MBED_BSD_SOCKET_TRACE) endif() if (CONFIG_CHIP_PW_RPC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17" PARENT_SCOPE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" PARENT_SCOPE) list(APPEND CHIP_DEFINES CHIP_PW_RPC=1 ) diff --git a/config/nrfconnect/app/enable-gnu-std.cmake b/config/nrfconnect/app/enable-gnu-std.cmake deleted file mode 100644 index 4019bbd31bf27a..00000000000000 --- a/config/nrfconnect/app/enable-gnu-std.cmake +++ /dev/null @@ -1,5 +0,0 @@ -add_library(gnu17 INTERFACE) -target_compile_options(gnu17 - INTERFACE - $<$:-std=gnu++17>) -target_link_libraries(app PRIVATE gnu17) diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 134e5a1d484f1e..0e51ecdfff96b9 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -99,8 +99,6 @@ zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) matter_add_cflags("${ZEPHYR_CFLAGS_C}") zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") -zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) -matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD}) # Set up custom OpenThread configuration diff --git a/config/nxp/app/enable-gnu-std.cmake b/config/nxp/app/enable-gnu-std.cmake deleted file mode 100644 index 7e3cfa773778e0..00000000000000 --- a/config/nxp/app/enable-gnu-std.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -add_library(gnu17 INTERFACE) -target_compile_options(gnu17 - INTERFACE - $<$:-std=gnu++17> - -Wno-stringop-truncation) -target_link_libraries(app PRIVATE gnu17) diff --git a/config/nxp/chip-module/CMakeLists.txt b/config/nxp/chip-module/CMakeLists.txt index 4371efc9d69367..577931912b85e7 100644 --- a/config/nxp/chip-module/CMakeLists.txt +++ b/config/nxp/chip-module/CMakeLists.txt @@ -67,8 +67,6 @@ zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) matter_add_cflags("${ZEPHYR_CFLAGS_C}") zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") -zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) -matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD}) # Set up custom OpenThread configuration diff --git a/config/qpg/lib/pw_rpc/BUILD.gn b/config/qpg/lib/pw_rpc/BUILD.gn index 99c64201f5df19..2d9b40841df32f 100644 --- a/config/qpg/lib/pw_rpc/BUILD.gn +++ b/config/qpg/lib/pw_rpc/BUILD.gn @@ -17,10 +17,10 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") config("cpp17") { - cflags_cc = [ "-std=gnu++17" ] - cflags_c = [ "-std=gnu11" ] - cflags_objc = [ "-std=gnu11" ] - cflags_objcc = [ "-std=gnu++17" ] + cflags_cc = [ "-std=c++17" ] + cflags_c = [ "-std=c11" ] + cflags_objc = [ "-std=c11" ] + cflags_objcc = [ "-std=c++17" ] } config("std_cpp17") { diff --git a/config/telink/app/enable-gnu-std.cmake b/config/telink/app/enable-gnu-std.cmake deleted file mode 100644 index 6ed9507ad9fd4e..00000000000000 --- a/config/telink/app/enable-gnu-std.cmake +++ /dev/null @@ -1,6 +0,0 @@ -add_library(gnu17 INTERFACE) -target_compile_options(gnu17 - INTERFACE - $<$:-std=gnu++17> - -D_DEFAULT_SOURCE) -target_link_libraries(app PRIVATE gnu17) diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index 0b095a53913612..9a48777132c200 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -62,8 +62,6 @@ zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) matter_add_cflags("${ZEPHYR_CFLAGS_C}") zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") -zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) -matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD}) matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=<${CONFIG_MBEDTLS_CFG_FILE}>) diff --git a/config/zephyr/app/enable-gnu-std.cmake b/config/zephyr/app/enable-gnu-std.cmake deleted file mode 100644 index 37c18235d0f513..00000000000000 --- a/config/zephyr/app/enable-gnu-std.cmake +++ /dev/null @@ -1,6 +0,0 @@ -add_library(gnu17 INTERFACE) -target_compile_options(gnu17 - INTERFACE - $<$:-std=gnu++17> - -D_DEFAULT_SOURCE) -target_link_libraries(app PRIVATE gnu17) \ No newline at end of file diff --git a/config/zephyr/chip-module/CMakeLists.txt b/config/zephyr/chip-module/CMakeLists.txt index e0b113a5bb3203..b682fbc8f96dd2 100644 --- a/config/zephyr/chip-module/CMakeLists.txt +++ b/config/zephyr/chip-module/CMakeLists.txt @@ -57,8 +57,6 @@ if(CONFIG_CHIP) matter_add_cflags("${ZEPHYR_CFLAGS_C}") zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") - zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) - matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}") # Set up custom OpenThread configuration if(CONFIG_CHIP_OPENTHREAD_CONFIG) diff --git a/config/zephyr/zephyr-util.cmake b/config/zephyr/zephyr-util.cmake index 0d634914ee73fb..2a6cb049a1c25e 100644 --- a/config/zephyr/zephyr-util.cmake +++ b/config/zephyr/zephyr-util.cmake @@ -37,26 +37,6 @@ function(zephyr_get_compile_flags VAR LANG) set(${VAR} ${INCLUDES} ${SYSTEM_INCLUDES} ${DEFINES} ${FLAGS} ${${VAR}} PARENT_SCOPE) endfunction() -# -# Select gnu++ standard matching C++ standard configured via Kconfig. -# -# Arguments: -# VAR Name of list variable to be appended with the selected "-std=gnu++" flag -# -macro(zephyr_get_gnu_cpp_standard VAR) - if (CONFIG_STD_CPP11) - list(APPEND ${VAR} -std=gnu++11) - elseif (CONFIG_STD_CPP14) - list(APPEND ${VAR} -std=gnu++14) - elseif (CONFIG_STD_CPP17) - list(APPEND ${VAR} -std=gnu++17) - elseif (CONFIG_STD_CPP2A) - list(APPEND ${VAR} -std=gnu++20) - else() - message(FATAL_ERROR "Building with unsupported C++ standard") - endif() -endmacro() - function(zephyr_set_openthread_config_impl OT_DIR CONFIG_FILE) get_property(DEFINES DIRECTORY ${OT_DIR} PROPERTY COMPILE_DEFINITIONS) get_property(SUBDIRS DIRECTORY ${OT_DIR} PROPERTY SUBDIRECTORIES) diff --git a/examples/air-quality-sensor-app/telink/CMakeLists.txt b/examples/air-quality-sensor-app/telink/CMakeLists.txt index 0cde6d4eb3f84a..66d0d7f7cf3810 100644 --- a/examples/air-quality-sensor-app/telink/CMakeLists.txt +++ b/examples/air-quality-sensor-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-air-quality-sensor-example) diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index eac3c948a3e0c9..d7b9c44fd7cd42 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -34,7 +34,7 @@ if(${IDF_TARGET} STREQUAL "esp32") endif() project(chip-all-clusters-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 6d353a3feb503b..0c9f60e2879768 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -35,7 +35,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-all-clusters-app-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt b/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt index 5f6a1422095d7b..efe85b894fffa5 100644 --- a/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt +++ b/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt @@ -37,7 +37,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nxp-all-clusters-app-example) -include(${CHIP_ROOT}/config/nxp/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) target_include_directories(app diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 68d407794e7b23..1fc47907f71314 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -23,7 +23,6 @@ get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-cluster get_filename_component(ENERGY_MANAGEMENT_COMMON_DIR ${CHIP_ROOT}/examples/energy-management-app/energy-management-common/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-all-clusters-app-example) diff --git a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt index 0af660ce2990e2..0d1e793a504e2a 100644 --- a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt @@ -34,7 +34,7 @@ if(${IDF_TARGET} STREQUAL "esp32") endif() project(chip-all-clusters-minimal-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt index d18fb15d33dd1a..b39dd2f98f978e 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt @@ -34,7 +34,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-all-clusters-minimal-app-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/all-clusters-minimal-app/telink/CMakeLists.txt b/examples/all-clusters-minimal-app/telink/CMakeLists.txt index a9da3ae4331a15..05ed28d1652585 100644 --- a/examples/all-clusters-minimal-app/telink/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/telink/CMakeLists.txt @@ -22,7 +22,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-all-clusters-minimal-app-example) diff --git a/examples/bridge-app/esp32/CMakeLists.txt b/examples/bridge-app/esp32/CMakeLists.txt index d5a5732e145274..dd39ada9ca84e0 100644 --- a/examples/bridge-app/esp32/CMakeLists.txt +++ b/examples/bridge-app/esp32/CMakeLists.txt @@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS # TODO: add CHIPProjectAppConfig.h to esp32 project(chip-bridge-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/bridge-app/telink/CMakeLists.txt b/examples/bridge-app/telink/CMakeLists.txt index e7984bc1332853..bae5e4704e629c 100644 --- a/examples/bridge-app/telink/CMakeLists.txt +++ b/examples/bridge-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-bridge-example) diff --git a/examples/chef/esp32/CMakeLists.txt b/examples/chef/esp32/CMakeLists.txt index 950e07c59e9d90..f121344e395101 100644 --- a/examples/chef/esp32/CMakeLists.txt +++ b/examples/chef/esp32/CMakeLists.txt @@ -54,7 +54,7 @@ endif() idf_build_set_property(COMPILE_OPTIONS "-DCHIP_PLATFORM_ESP32=1" APPEND) project(chip-shell) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 20fcc2cdf4be84..a9a9c18e43cc9d 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -42,7 +42,6 @@ get_filename_component(GEN_DIR ${CHEF}/out/${CONFIG_CHEF_DEVICE_TYPE}/zap-genera project(chip-nrfconnect-chef-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) # -Wmaybe-uninitialized has too many false positives, including on std::optional diff --git a/examples/chef/telink/CMakeLists.txt b/examples/chef/telink/CMakeLists.txt index 364725c34383fc..32b132052a681b 100755 --- a/examples/chef/telink/CMakeLists.txt +++ b/examples/chef/telink/CMakeLists.txt @@ -26,7 +26,6 @@ include(${CHEF}/project_include.cmake) get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-chef-example) diff --git a/examples/contact-sensor-app/telink/CMakeLists.txt b/examples/contact-sensor-app/telink/CMakeLists.txt index 47ec8757942519..8bbb0d1f9e4914 100755 --- a/examples/contact-sensor-app/telink/CMakeLists.txt +++ b/examples/contact-sensor-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-contact-sensor-example) diff --git a/examples/energy-management-app/esp32/CMakeLists.txt b/examples/energy-management-app/esp32/CMakeLists.txt index 003d4c28f35343..c9e4ae99c53d85 100644 --- a/examples/energy-management-app/esp32/CMakeLists.txt +++ b/examples/energy-management-app/esp32/CMakeLists.txt @@ -43,7 +43,7 @@ if(CONFIG_ENABLE_ENCRYPTED_OTA) endif() # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt index b3a03be0403676..fca406dcaa9fc4 100644 --- a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt +++ b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt @@ -38,7 +38,6 @@ target_compile_options(app PRIVATE -Werror PRIVATE -Wno-error=format) project(chip-nxp-all-clusters-app-example) -include(${CHIP_ROOT}/config/nxp/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) target_include_directories(app diff --git a/examples/light-switch-app/esp32/CMakeLists.txt b/examples/light-switch-app/esp32/CMakeLists.txt index bf879bedfbbe1c..95d6f32921271b 100644 --- a/examples/light-switch-app/esp32/CMakeLists.txt +++ b/examples/light-switch-app/esp32/CMakeLists.txt @@ -32,7 +32,7 @@ set(EXTRA_COMPONENT_DIRS project(chip-light-switch-app) # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index 3eec4764d96ec9..af2c7cf5f7a493 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -34,7 +34,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-light-switch-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/light-switch-app/telink/CMakeLists.txt b/examples/light-switch-app/telink/CMakeLists.txt index 660769df9a59c4..1e33619a280ecd 100755 --- a/examples/light-switch-app/telink/CMakeLists.txt +++ b/examples/light-switch-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-light-switch-example) diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index 1ff842ddaa169a..1c9670fcf6bfbe 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -43,7 +43,7 @@ if(CONFIG_ENABLE_ENCRYPTED_OTA) endif() # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index dd5b65afe632df..8df60690f14955 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -28,7 +28,6 @@ find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(chip-nrfconnect-lighting-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni b/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni index 2afd19aeef800a..44281e3609f2e0 100644 --- a/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni +++ b/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni @@ -33,5 +33,5 @@ chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false nxp_enable_ot_cli = false -cpp_standard = "gnu++17" +cpp_standard = "c++17" is_debug = false diff --git a/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni b/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni index 2afd19aeef800a..44281e3609f2e0 100644 --- a/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni +++ b/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni @@ -33,5 +33,5 @@ chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false nxp_enable_ot_cli = false -cpp_standard = "gnu++17" +cpp_standard = "c++17" is_debug = false diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 95930946944237..7b7dff9968595b 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-lighting-example) diff --git a/examples/lit-icd-app/esp32/CMakeLists.txt b/examples/lit-icd-app/esp32/CMakeLists.txt index 41cf5d2686db44..f126740e681fb8 100644 --- a/examples/lit-icd-app/esp32/CMakeLists.txt +++ b/examples/lit-icd-app/esp32/CMakeLists.txt @@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS ) project(lit-icd-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the RISC-V chips, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/lit-icd-app/nrfconnect/CMakeLists.txt b/examples/lit-icd-app/nrfconnect/CMakeLists.txt index a624da1b22fef0..edb8b6bc406dee 100644 --- a/examples/lit-icd-app/nrfconnect/CMakeLists.txt +++ b/examples/lit-icd-app/nrfconnect/CMakeLists.txt @@ -33,7 +33,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-lit-icd-app-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lock-app/esp32/CMakeLists.txt b/examples/lock-app/esp32/CMakeLists.txt index dc60efc678c4c9..8b0f2e81a3b82a 100644 --- a/examples/lock-app/esp32/CMakeLists.txt +++ b/examples/lock-app/esp32/CMakeLists.txt @@ -31,7 +31,7 @@ set(EXTRA_COMPONENT_DIRS project(chip-lock-app) # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index 27ed04aceb4e01..2aeb609af5cf35 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -33,7 +33,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-lock-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/lock-app/telink/CMakeLists.txt b/examples/lock-app/telink/CMakeLists.txt index b2598b171f7712..86ed4862aa2e07 100755 --- a/examples/lock-app/telink/CMakeLists.txt +++ b/examples/lock-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-lock-example) diff --git a/examples/ota-provider-app/esp32/CMakeLists.txt b/examples/ota-provider-app/esp32/CMakeLists.txt index 156c9366e183b1..2766d994eacbec 100644 --- a/examples/ota-provider-app/esp32/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/CMakeLists.txt @@ -30,7 +30,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-ota-provider-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/ota-requestor-app/esp32/CMakeLists.txt b/examples/ota-requestor-app/esp32/CMakeLists.txt index 1a151debdd8901..e181bbd9fe9329 100644 --- a/examples/ota-requestor-app/esp32/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/CMakeLists.txt @@ -31,7 +31,7 @@ set(EXTRA_COMPONENT_DIRS project(chip-ota-requestor-app) # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/ota-requestor-app/telink/CMakeLists.txt b/examples/ota-requestor-app/telink/CMakeLists.txt index c4ac02600cb1ef..9cab32f3c554b4 100644 --- a/examples/ota-requestor-app/telink/CMakeLists.txt +++ b/examples/ota-requestor-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-ota-requestor-example) diff --git a/examples/persistent-storage/esp32/CMakeLists.txt b/examples/persistent-storage/esp32/CMakeLists.txt index 86bf87b7a4a4d5..cb1619a419fa47 100644 --- a/examples/persistent-storage/esp32/CMakeLists.txt +++ b/examples/persistent-storage/esp32/CMakeLists.txt @@ -28,7 +28,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-persistent-storage) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/pigweed-app/esp32/CMakeLists.txt b/examples/pigweed-app/esp32/CMakeLists.txt index 262376d5ea9562..6801796c8e583f 100644 --- a/examples/pigweed-app/esp32/CMakeLists.txt +++ b/examples/pigweed-app/esp32/CMakeLists.txt @@ -30,7 +30,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-pigweed-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index 476494c4c07056..3f2df8c6d1c997 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -33,7 +33,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-pump-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/pump-app/telink/CMakeLists.txt b/examples/pump-app/telink/CMakeLists.txt index 707abb6ee26def..a2dc357ad58ee4 100755 --- a/examples/pump-app/telink/CMakeLists.txt +++ b/examples/pump-app/telink/CMakeLists.txt @@ -20,7 +20,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-pump-example) diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index 8eea9be7dac58d..5c488177f40813 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -33,7 +33,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-pump-controller-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/pump-controller-app/telink/CMakeLists.txt b/examples/pump-controller-app/telink/CMakeLists.txt index 4b54bd87242b9a..49fa49c6f62590 100755 --- a/examples/pump-controller-app/telink/CMakeLists.txt +++ b/examples/pump-controller-app/telink/CMakeLists.txt @@ -20,7 +20,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-pump-controller-example) diff --git a/examples/shell/esp32/CMakeLists.txt b/examples/shell/esp32/CMakeLists.txt index 3b23f33624aeb6..e7e51e24a7939a 100644 --- a/examples/shell/esp32/CMakeLists.txt +++ b/examples/shell/esp32/CMakeLists.txt @@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-shell) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various diff --git a/examples/shell/nrfconnect/CMakeLists.txt b/examples/shell/nrfconnect/CMakeLists.txt index 06e929d309830a..b95fc93f79c6e3 100644 --- a/examples/shell/nrfconnect/CMakeLists.txt +++ b/examples/shell/nrfconnect/CMakeLists.txt @@ -32,8 +32,6 @@ endif() project(chip-nrfconnect-shell-example) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) - # -Wmaybe-uninitialized has too many false positives, including on std::optional # and chip::Optional. Make it nonfatal. # diff --git a/examples/shell/telink/CMakeLists.txt b/examples/shell/telink/CMakeLists.txt index 9743b1149a1fc1..86eedddd835334 100755 --- a/examples/shell/telink/CMakeLists.txt +++ b/examples/shell/telink/CMakeLists.txt @@ -22,7 +22,6 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(APP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-shell-example) diff --git a/examples/smoke-co-alarm-app/telink/CMakeLists.txt b/examples/smoke-co-alarm-app/telink/CMakeLists.txt index 2f5690fb4f0576..21d95cfe6b3144 100755 --- a/examples/smoke-co-alarm-app/telink/CMakeLists.txt +++ b/examples/smoke-co-alarm-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-smoke-co-alarm-example) diff --git a/examples/temperature-measurement-app/esp32/CMakeLists.txt b/examples/temperature-measurement-app/esp32/CMakeLists.txt index cba8c066ed419d..4b93696c994c77 100644 --- a/examples/temperature-measurement-app/esp32/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/CMakeLists.txt @@ -36,7 +36,7 @@ set(EXTRA_COMPONENT_DIRS ) project(chip-temperature-measurement-app) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/temperature-measurement-app/telink/CMakeLists.txt b/examples/temperature-measurement-app/telink/CMakeLists.txt index a271abf295765b..a47bb81a6de9f3 100644 --- a/examples/temperature-measurement-app/telink/CMakeLists.txt +++ b/examples/temperature-measurement-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) add_compile_definitions(IDENTIFY_CLUSTER_DISABLED=1) diff --git a/examples/thermostat/nxp/zephyr/CMakeLists.txt b/examples/thermostat/nxp/zephyr/CMakeLists.txt index 221e66e2451162..7b5e6e6ee59919 100644 --- a/examples/thermostat/nxp/zephyr/CMakeLists.txt +++ b/examples/thermostat/nxp/zephyr/CMakeLists.txt @@ -38,7 +38,6 @@ target_compile_options(app PRIVATE -Werror PRIVATE -Wno-error=format) project(chip-nxp-all-clusters-app-example) -include(${CHIP_ROOT}/config/nxp/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) target_include_directories(app diff --git a/examples/thermostat/telink/CMakeLists.txt b/examples/thermostat/telink/CMakeLists.txt index 166d8b8189a8e8..9447e0398f10d9 100755 --- a/examples/thermostat/telink/CMakeLists.txt +++ b/examples/thermostat/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-thermostat-example) diff --git a/examples/thread-br-app/esp32/CMakeLists.txt b/examples/thread-br-app/esp32/CMakeLists.txt index 7661eae12fdfc0..8fc89603cbebe0 100644 --- a/examples/thread-br-app/esp32/CMakeLists.txt +++ b/examples/thread-br-app/esp32/CMakeLists.txt @@ -31,7 +31,7 @@ set(EXTRA_COMPONENT_DIRS project(chip-thread-br-app) # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) # For the C3, project_include.cmake sets -Wno-format, but does not clear various # flags that depend on -Wformat diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 882961ed913b3d..25ed8dd56a4381 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -533,7 +533,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; @@ -564,7 +564,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -596,7 +596,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; @@ -627,7 +627,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = z; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj index 7716d722be4c43..bbef04f5eabc97 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj @@ -305,7 +305,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -336,7 +336,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -368,7 +368,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -399,7 +399,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = CHIP_HAVE_CONFIG_H; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/examples/window-app/nrfconnect/CMakeLists.txt b/examples/window-app/nrfconnect/CMakeLists.txt index 7418f7054649ef..dd7ca0f2ed499b 100644 --- a/examples/window-app/nrfconnect/CMakeLists.txt +++ b/examples/window-app/nrfconnect/CMakeLists.txt @@ -35,7 +35,6 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized) project(chip-nrfconnect-window-app-example) include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake) -include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) diff --git a/examples/window-app/telink/CMakeLists.txt b/examples/window-app/telink/CMakeLists.txt index 1a7a4611c81d9f..c558ac0e6de39b 100644 --- a/examples/window-app/telink/CMakeLists.txt +++ b/examples/window-app/telink/CMakeLists.txt @@ -21,7 +21,6 @@ get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALP get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) include(${TELINK_COMMON}/common.cmake) -include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) project(chip-telink-window-app-example) diff --git a/scripts/examples/tests/expected_test_cmakelists.txt b/scripts/examples/tests/expected_test_cmakelists.txt index cf615cd42e0005..a2dc591abfc0ee 100644 --- a/scripts/examples/tests/expected_test_cmakelists.txt +++ b/scripts/examples/tests/expected_test_cmakelists.txt @@ -48,7 +48,7 @@ set_property(TARGET "${target}" APPEND PROPERTY INCLUDE_DIRECTORIES "//TEST_ROOT_PATH/src/include/" "//TEST_ROOT_PATH/src/") set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;") -set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=gnu++14 -fno-rtti ") +set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=c++14 -fno-rtti ") set_target_properties("${target}" PROPERTIES LINK_FLAGS "-O0 ") add_dependencies("${target}" "root_dep_action") @@ -72,7 +72,7 @@ set_property(TARGET "${target}" APPEND PROPERTY INCLUDE_DIRECTORIES "//TEST_ROOT_PATH/third_party/nlio/repo/include/" "//TEST_ROOT_PATH/third_party/nlfaultinjection/include/") set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;") -set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=gnu++14 -fno-rtti ") +set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=c++14 -fno-rtti ") set_target_properties("${target}" PROPERTIES LINK_FLAGS "-O0 ") add_dependencies("${target}" "root_dep_action") @@ -94,7 +94,7 @@ set_property(TARGET "${target}" APPEND PROPERTY INCLUDE_DIRECTORIES "//TEST_ROOT_PATH/src/include/" "//TEST_ROOT_PATH/src/") set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;") -set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-Wconversion -std=gnu++14 -fno-rtti ") +set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-Wconversion -std=c++14 -fno-rtti ") set_target_properties("${target}" PROPERTIES LINK_FLAGS "-O0 ") add_dependencies("${target}" "root_dep_action") @@ -114,7 +114,7 @@ set_property(TARGET "${target}" APPEND PROPERTY INCLUDE_DIRECTORIES "//TEST_ROOT_PATH/src/include/" "//TEST_ROOT_PATH/src/") set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;") -set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=gnu++14 -fno-rtti ") +set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=c++14 -fno-rtti ") set_target_properties("${target}" PROPERTIES LINK_FLAGS "-O0 ") add_dependencies("${target}" "root_dep_action" diff --git a/scripts/examples/tests/test_project.json b/scripts/examples/tests/test_project.json index 2f13899deed5ca..0a4272a91b1fbc 100644 --- a/scripts/examples/tests/test_project.json +++ b/scripts/examples/tests/test_project.json @@ -31,10 +31,10 @@ "//:executable_test": { "asmflags": ["-march=armv8-a"], "cflags": ["-march=armv8-a", "-O0"], - "cflags_c": ["-std=gnu11"], - "cflags_cc": ["-std=gnu++14", "-fno-rtti"], - "cflags_objc": ["-std=gnu11"], - "cflags_objcc": ["-std=gnu++14"], + "cflags_c": ["-std=c11"], + "cflags_cc": ["-std=c++14", "-fno-rtti"], + "cflags_objc": ["-std=c11"], + "cflags_objcc": ["-std=c++14"], "check_includes": true, "configs": [ "//build/config/compiler:abi_default", @@ -68,10 +68,10 @@ "//root:shared_library_test": { "asmflags": ["-march=armv8-a"], "cflags": ["-march=armv8-a", "-O0"], - "cflags_c": ["-std=gnu11"], - "cflags_cc": ["-std=gnu++14", "-fno-rtti"], - "cflags_objc": ["-std=gnu11"], - "cflags_objcc": ["-std=gnu++14"], + "cflags_c": ["-std=c11"], + "cflags_cc": ["-std=c++14", "-fno-rtti"], + "cflags_objc": ["-std=c11"], + "cflags_objcc": ["-std=c++14"], "check_includes": true, "configs": [ "//build/config/compiler:abi_default", @@ -113,10 +113,10 @@ "//root:static_library_test": { "asmflags": ["-march=armv8-a"], "cflags": ["-Wconversion", "-march=armv8-a"], - "cflags_c": ["-std=gnu11"], - "cflags_cc": ["-std=gnu++14", "-fno-rtti"], - "cflags_objc": ["-std=gnu11"], - "cflags_objcc": ["-std=gnu++14"], + "cflags_c": ["-std=c11"], + "cflags_cc": ["-std=c++14", "-fno-rtti"], + "cflags_objc": ["-std=c11"], + "cflags_objcc": ["-std=c++14"], "check_includes": true, "configs": [ "//build/config/compiler:abi_default", @@ -151,10 +151,10 @@ "//root:source_set_test": { "asmflags": ["-march=armv8-a"], "cflags": ["-march=armv8-a", "-O0"], - "cflags_c": ["-std=gnu11"], - "cflags_cc": ["-std=gnu++14", "-fno-rtti"], - "cflags_objc": ["-std=gnu11"], - "cflags_objcc": ["-std=gnu++14"], + "cflags_c": ["-std=c11"], + "cflags_cc": ["-std=c++14", "-fno-rtti"], + "cflags_objc": ["-std=c11"], + "cflags_objcc": ["-std=c++14"], "check_includes": true, "configs": [ "//build/config/compiler:abi_default", diff --git a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj index 67692af8f88bc4..619aa06cbcd8d9 100644 --- a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj +++ b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj @@ -447,7 +447,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -479,7 +479,7 @@ ENABLE_HARDENED_RUNTIME = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -508,7 +508,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -540,7 +540,7 @@ ENABLE_HARDENED_RUNTIME = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( CHIP_HAVE_CONFIG_H, diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 2590899f983ba7..b07da661168f2d 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -2837,7 +2837,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CHIP_ROOT = "$(PROJECT_DIR)/../../.."; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -2865,7 +2865,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -2885,7 +2885,7 @@ MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\""; - OTHER_TAPI_FLAGS = "-x objective-c++ -std=gnu++17 -fvisibility=hidden -fobjc-arc"; + OTHER_TAPI_FLAGS = "-x objective-c++ -std=c++17 -fvisibility=hidden -fobjc-arc"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvos appletvsimulator watchos watchsimulator"; SUPPORTS_TEXT_BASED_API = YES; @@ -3009,7 +3009,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CHIP_ROOT = "$(PROJECT_DIR)/../../.."; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -3038,7 +3038,7 @@ DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", @@ -3056,7 +3056,7 @@ MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\""; - OTHER_TAPI_FLAGS = "-x objective-c++ -std=gnu++17 -fvisibility=hidden -fobjc-arc"; + OTHER_TAPI_FLAGS = "-x objective-c++ -std=c++17 -fvisibility=hidden -fobjc-arc"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvos appletvsimulator watchos watchsimulator"; SUPPORTS_TEXT_BASED_API = YES; diff --git a/src/test_driver/esp32/CMakeLists.txt b/src/test_driver/esp32/CMakeLists.txt index 1dea06ff1c6c77..2f591085d382ef 100644 --- a/src/test_driver/esp32/CMakeLists.txt +++ b/src/test_driver/esp32/CMakeLists.txt @@ -32,7 +32,7 @@ set(EXTRA_COMPONENT_DIRS project(test-driver) # C++17 is required for RPC build. -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=c++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index 2bae18ab2a5db7..375ae5e4076e6b 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -301,7 +301,7 @@ template("ti_simplelink_sdk") { defines = [] include_dirs = [] - # POSIX-like porting layer is incompatable with the gnu definitions from -std=gnu11 + # POSIX-like porting layer is incompatable with the gnu definitions from -std=c11 configs -= [ "${build_root}/config/compiler:std_default" ] configs += [ ":${sdk_target_name}_posix_config" ] sources = [