Files
openwrt_yocto/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch
T
francis.wang 4c86c082a2 Initial commit: OpenWrt-Yocto monorepo
Combine poky (Yocto scarthgap), meta-openembedded (scarthgap), and
meta-openwrt into a single repository.

Components:
- poky/             Yocto core framework (BitBake + OE-Core)
- meta-openembedded/ Community layers (meta-oe, meta-python, meta-networking)
- meta-openwrt/     OpenWrt customization layer
- setup-env.sh      One-click build environment setup
- README.md         Project documentation
2026-07-11 13:28:01 +08:00

36 lines
1.1 KiB
Diff

Do not hardcode C std to C99 or C++ std to C++11 if not set
OE compilers are using newer than these standards and absl needs C++14 minimum
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,16 +46,6 @@ set_property(CACHE OTBR_MDNS PROPERTY ST
include("${PROJECT_SOURCE_DIR}/etc/cmake/options.cmake")
-if(NOT CMAKE_C_STANDARD)
- set(CMAKE_C_STANDARD 99)
- set(CMAKE_C_STANDARD_REQUIRED ON)
-endif()
-
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 11)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-endif()
-
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}")
@@ -63,6 +53,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-Wno-error=nonnull-compare)
endif()
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18.1)
+ add_compile_options(-Wno-error=vla-cxx-extension)
+endif()
+
if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
message(STATUS "Coverage: ON")
target_compile_options(otbr-config INTERFACE -g -O0 --coverage)