aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-05-13 15:39:03 +0200
committerGitHub <noreply@github.com>2024-05-13 15:39:03 +0200
commite6efdbbd893340e39a35ae311adf81b19c0cdbb2 (patch)
tree030750bf2ab44d309833310192c89a6763b6b749
parenta691ed6c66930689644ebd7cc3417bf5f1de5646 (diff)
parent9a68b68092f8d91b249b47e86b572d9bd5bfcc17 (diff)
Merge pull request #31186 from vespa-engine/toregge/dont-promote-vla-warning-to-error-when-compiling-with-clang-18
Don't promote vla warning to error when compiling with clang 18.
-rw-r--r--build_settings.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index 1549ac83c74..e046d7f71f3 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -65,6 +65,9 @@ endif()
set(VESPA_ATOMIC_LIB "atomic")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CXX_SPECIFIC_WARN_OPTS "-Wnon-virtual-dtor -Wformat-security -Wno-overloaded-virtual")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18.0)
+ set(CXX_SPECIFIC_WARN_OPTS "${CXX_SPECIFIC_WARN_OPTS} -Wno-error=vla-cxx-extension")
+ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks -fsized-deallocation")
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(VESPA_ATOMIC_LIB "")