Skip to content

Commit

Permalink
Enable support for C++23 in esp-idf
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFEEDC0DE64 committed Mar 20, 2023
1 parent af805df commit a96f5bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function(__build_set_lang_version)
# Use latest supported versions.
# Please update docs/en/api-guides/cplusplus.rst when changing this.
set(c_std gnu17)
set(cxx_std gnu++20)
set(cxx_std gnu++23)
else()
enable_language(C CXX)
# Building for Linux target, fall back to an older version of the standard
Expand All @@ -149,7 +149,7 @@ function(__build_set_lang_version)
"${preferred_c_versions}. Please upgrade the host compiler.")
endif()

set(preferred_cxx_versions gnu++20 gnu++2a gnu++17 gnu++14)
set(preferred_cxx_versions gnu++23 gnu++20 gnu++2a gnu++17 gnu++14)
set(ver_found FALSE)
foreach(cxx_version ${preferred_cxx_versions})
check_cxx_compiler_flag("-std=${cxx_version}" ver_${cxx_version}_supported)
Expand Down

0 comments on commit a96f5bd

Please sign in to comment.