Skip to content

Commit 67324e6

Browse files
Update various bits to c++17 and gnu++17. (project-chip#28280)
A number of gnu++14/c++14/c++11/gnu++11 got missed.
1 parent 9c90f0f commit 67324e6

File tree

16 files changed

+25
-31
lines changed

16 files changed

+25
-31
lines changed

.vscode/c_cpp_properties.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.gcc.json",
66
"compilerPath": "/usr/bin/gcc",
77
"cStandard": "c11",
8-
"cppStandard": "gnu++14",
8+
"cppStandard": "gnu++17",
99
"intelliSenseMode": "gcc-x64",
1010
"browse": {
1111
"path": ["${workspaceFolder}/out/debug/"],
@@ -17,7 +17,7 @@
1717
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.clang.json",
1818
"compilerPath": "/usr/bin/clang",
1919
"cStandard": "c11",
20-
"cppStandard": "gnu++14",
20+
"cppStandard": "gnu++17",
2121
"intelliSenseMode": "clang-x64",
2222
"browse": {
2323
"path": ["${workspaceFolder}/out/debug/"],
@@ -29,7 +29,7 @@
2929
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.mbedtls.json",
3030
"compilerPath": "/usr/bin/gcc",
3131
"cStandard": "c11",
32-
"cppStandard": "gnu++14",
32+
"cppStandard": "gnu++17",
3333
"intelliSenseMode": "gcc-x64",
3434
"browse": {
3535
"path": ["${workspaceFolder}/out/debug/"],
@@ -39,7 +39,7 @@
3939
{
4040
"name": "Android x64 debug (GN)",
4141
"cStandard": "c11",
42-
"cppStandard": "c++11",
42+
"cppStandard": "gnu++17",
4343
"intelliSenseMode": "clang-x64",
4444
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.android_x64.json",
4545
"compilerPath": "/opt/android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang",
@@ -51,7 +51,7 @@
5151
{
5252
"name": "Android arm64 debug (GN)",
5353
"cStandard": "c11",
54-
"cppStandard": "c++11",
54+
"cppStandard": "gnu++17",
5555
"intelliSenseMode": "clang-arm64",
5656
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.android_arm64.json",
5757
"compilerPath": "/opt/android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang",
@@ -63,7 +63,7 @@
6363
{
6464
"name": "EFR32 examples debug (GN)",
6565
"cStandard": "c11",
66-
"cppStandard": "c++11",
66+
"cppStandard": "gnu++17",
6767
"intelliSenseMode": "gcc-arm",
6868
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.efr32.json",
6969
"compilerPath": "/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc",
@@ -75,7 +75,7 @@
7575
{
7676
"name": "nRF Connect examples debug (GN)",
7777
"cStandard": "c11",
78-
"cppStandard": "gnu++14",
78+
"cppStandard": "gnu++17",
7979
"intelliSenseMode": "gcc-arm",
8080
"compilerPath": "/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc",
8181
"browse": {
@@ -86,7 +86,7 @@
8686
{
8787
"name": "Tizen examples debug (GN)",
8888
"cStandard": "c11",
89-
"cppStandard": "gnu++14",
89+
"cppStandard": "gnu++17",
9090
"intelliSenseMode": "gcc-arm",
9191
"compilerPath": "/opt/tizen-sdk/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-gcc",
9292
"compileCommands": "${workspaceFolder}/out/debug/compile_commands.tizen_arm.json",

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
],
167167
"clang-format.fallbackStyle": "WebKit",
168168
"files.trimFinalNewlines": true,
169-
"C_Cpp.default.cppStandard": "gnu++14",
169+
"C_Cpp.default.cppStandard": "gnu++17",
170170
"C_Cpp.default.cStandard": "gnu11",
171171
"cmake.configureOnOpen": false,
172172
"search.followSymlinks": false,

examples/all-clusters-app/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ list(
298298
APPEND chip_main_cpp_flags
299299

300300
-Wno-unused-parameter
301-
-std=gnu++11
302-
-std=c++14
301+
-std=c++17
303302
-fno-rtti
304303
)
305304
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/all-clusters-minimal-app/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ list(
258258
APPEND chip_main_cpp_flags
259259

260260
-Wno-unused-parameter
261-
-std=gnu++11
262-
-std=c++14
261+
-std=c++17
263262
-fno-rtti
264263
)
265264
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/bridge-app/esp32/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS
2929

3030
# TODO: add CHIPProjectAppConfig.h to esp32
3131
project(chip-bridge-app)
32-
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND)
32+
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND)
3333
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
3434
# For the C3, project_include.cmake sets -Wno-format, but does not clear various
3535
# flags that depend on -Wformat

examples/chef/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ list(
114114
APPEND chip_main_cpp_flags
115115

116116
-Wno-unused-parameter
117-
-std=gnu++11
118-
-std=c++14
117+
-std=c++17
119118
-fno-rtti
120119
)
121120
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/light-switch-app/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ list(
287287
APPEND chip_main_cpp_flags
288288

289289
-Wno-unused-parameter
290-
-std=gnu++11
291-
-std=c++14
290+
-std=c++17
292291
-fno-rtti
293292
)
294293
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/lighting-app/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ list(
274274
APPEND chip_main_cpp_flags
275275

276276
-Wno-unused-parameter
277-
-std=gnu++11
278-
-std=c++14
277+
-std=c++17
279278
-fno-rtti
280279
)
281280
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/ota-provider-app/esp32/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set(EXTRA_COMPONENT_DIRS
3030
)
3131

3232
project(chip-ota-provider-app)
33-
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
33+
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
3434
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
3535
# For the C3, project_include.cmake sets -Wno-format, but does not clear various
3636
# flags that depend on -Wformat

examples/ota-requestor-app/ameba/chip_main.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ list(
9191
APPEND chip_main_cpp_flags
9292

9393
-Wno-unused-parameter
94-
-std=gnu++11
95-
-std=c++14
94+
-std=c++17
9695
-fno-rtti
9796
)
9897
target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} )

examples/persistent-storage/esp32/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ set(EXTRA_COMPONENT_DIRS
2828
)
2929

3030
project(chip-persistent-storage)
31-
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
31+
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
3232
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
3333
# For the C3, project_include.cmake sets -Wno-format, but does not clear various
3434
# flags that depend on -Wformat

examples/shell/esp32/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set(EXTRA_COMPONENT_DIRS
2929
)
3030

3131
project(chip-shell)
32-
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
32+
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
3333
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
3434

3535
# For the C3, project_include.cmake sets -Wno-format, but does not clear various

src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
ALWAYS_SEARCH_USER_PATHS = NO;
448448
CLANG_ANALYZER_NONNULL = YES;
449449
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
450-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
450+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
451451
CLANG_CXX_LIBRARY = "libc++";
452452
CLANG_ENABLE_MODULES = YES;
453453
CLANG_ENABLE_OBJC_ARC = YES;
@@ -508,7 +508,7 @@
508508
ALWAYS_SEARCH_USER_PATHS = NO;
509509
CLANG_ANALYZER_NONNULL = YES;
510510
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
511-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
511+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
512512
CLANG_CXX_LIBRARY = "libc++";
513513
CLANG_ENABLE_MODULES = YES;
514514
CLANG_ENABLE_OBJC_ARC = YES;

src/darwin/Framework/Matter.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@
16861686
buildSettings = {
16871687
ALWAYS_SEARCH_USER_PATHS = NO;
16881688
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1689-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1689+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
16901690
CLANG_CXX_LIBRARY = "libc++";
16911691
CLANG_ENABLE_MODULES = YES;
16921692
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1858,7 +1858,7 @@
18581858
buildSettings = {
18591859
ALWAYS_SEARCH_USER_PATHS = NO;
18601860
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1861-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1861+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
18621862
CLANG_CXX_LIBRARY = "libc++";
18631863
CLANG_ENABLE_MODULES = YES;
18641864
CLANG_ENABLE_OBJC_ARC = YES;

third_party/ti_simplelink_sdk/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ config("ti_simplelink_freertos_config") {
110110
config("ti_simplelink_posix_config") {
111111
include_dirs = [ "${ti_simplelink_sdk_root}/source/ti/posix/gcc" ]
112112
cflags_c = [ "-std=c11" ]
113-
cflags_cc = [ "-std=c++14" ]
113+
cflags_cc = [ "-std=c++17" ]
114114
cflags = [
115115
"-Wno-maybe-uninitialized",
116116
"-Wno-sign-compare",

third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ template("ti_simplelink_sdk") {
277277
config("${sdk_target_name}_posix_config") {
278278
include_dirs = [ "${ti_simplelink_sdk_root}/source/ti/posix/gcc" ]
279279
cflags_c = [ "-std=c11" ]
280-
cflags_cc = [ "-std=c++14" ]
280+
cflags_cc = [ "-std=c++17" ]
281281
cflags = [
282282
"-Wno-maybe-uninitialized",
283283
"-Wno-sign-compare",

0 commit comments

Comments
 (0)