]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/CMakeLists.txt: add -Wno-vla-cxx-extension to clang
authorMatan Breizman <mbreizma@redhat.com>
Mon, 17 Feb 2025 07:39:19 +0000 (07:39 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 20 Feb 2025 14:27:33 +0000 (14:27 +0000)
The following warning of:
```
error: variable length arrays in C++ are a Clang extension
[-Werror,-Wvla-cxx-extension]
```
is enabled by default in clang 18 and above.
Disable it in our builds due to large anmount of warnings.
We can revert this once we handle some of the warnings in future PRs.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/CMakeLists.txt

index a32600d4e06f4fbce58cc3445cfde9be835c65dc..eea961a23f3c7e49159bbf900c211e28ee233bca 100644 (file)
@@ -168,7 +168,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
     -Wno-gnu-designator
     -Wno-missing-braces
     -Wno-parentheses
-    -Wno-deprecated-register)
+    -Wno-deprecated-register
+    -Wno-vla-cxx-extension)
   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")