From: Matan Breizman Date: Tue, 18 Feb 2025 11:07:17 +0000 (+0000) Subject: src/CMakeLists.txt: -Wno-vla-cxx-extension only on clang >= 18 X-Git-Tag: v20.0.0~60^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ea54929b343c3fc0b7aa27ecc57fbc12eff442f;p=ceph.git 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 --- 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")