From 6ea54929b343c3fc0b7aa27ecc57fbc12eff442f Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Tue, 18 Feb 2025 11:07:17 +0000 Subject: [PATCH] src/CMakeLists.txt: -Wno-vla-cxx-extension only on clang >= 18 ``` error: unknown warning option '-Wno-vla-cxx-extension'; did you mean '-Wno-vla-extension'? [-Werror,-Wunknown-warning-option] ``` Signed-off-by: Matan Breizman --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index eea961a23f3..5586cd03a2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -168,8 +168,11 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang) -Wno-gnu-designator -Wno-missing-braces -Wno-parentheses - -Wno-deprecated-register + -Wno-deprecated-register) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) + add_compile_options( -Wno-vla-cxx-extension) + endif() if(FREEBSD) # Need to use the GNU binutils linker to get versioning right. string(APPEND CMAKE_EXE_LINKER_FLAGS " -fuse-ld=/usr/local/bin/ld -Wno-unused-command-line-argument") -- 2.39.5