diff mbox series

[whinlatter] abseil-cpp: Set CMAKE_CXX_STANDARD to 17

Message ID 20260203041250.2332880-1-yogesh.tyagi@intel.com
State New
Headers show
Series [whinlatter] abseil-cpp: Set CMAKE_CXX_STANDARD to 17 | expand

Commit Message

Yogesh Tyagi Feb. 3, 2026, 4:12 a.m. UTC
From: Yogesh Tyagi <yogesh.tyagi@intel.com>

The compiler defaults to C++ < 17 which causes build failures.
Abseil requires C++17 or higher, so explicitly set CMAKE_CXX_STANDARD=17
to ensure the build uses the correct C++ standard.

Error:
CMake Error at CMake/AbseilDll.cmake:745 (message):
  The compiler defaults to or is configured for C++ < 17.  C++ >= 17 is
  required and Abseil and all libraries that use Abseil must use the same C++
  language standard
---
 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250814.1.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250814.1.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250814.1.bb
index 0394f36cdb..3ab4fa1cde 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250814.1.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250814.1.bb
@@ -21,6 +21,7 @@  inherit cmake
 EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
                  -DBUILD_TESTING=OFF    \
                  -DABSL_ENABLE_INSTALL=ON \
+                 -DCMAKE_CXX_STANDARD=17 \
                 "
 #  riscv32-yoe-linux-ld.lld: error: undefined reference: __atomic_store_8
 #  >>> referenced by <recipe-sysroot>/usr/lib/libabsl_flags_internal.so.2505.0.0 (disallowed by --no-allow-shlib-undefined)