Silence compile errors with clang 19.0.0git

-Wcast-function-type-mismatch was added in clang 19.1. Change the
version check to "VERSION_GREATER 19.0.999" instead.

Add -Wno-vla-cxx-extension for ihv/arm to silence

  gator_api.cpp:312:15: error: variable length arrays in C++ are a
  Clang extension [-Werror,-Wvla-cxx-extension]
This commit is contained in:
Chia-I Wu
2026-02-01 03:15:38 +09:00
committed by Baldur Karlsson
parent bd78fcc473
commit 2b88b2c3ae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ set_property(SOURCE ${sources}
PROPERTY COMPILE_FLAGS "-Wno-unknown-warning-option -Wno-range-loop-construct")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_property(SOURCE ${sources} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-shadow -Wno-shorten-64-to-32")
set_property(SOURCE ${sources} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-shadow -Wno-shorten-64-to-32 -Wno-vla-cxx-extension")
endif()
add_library(rdoc_arm OBJECT ${sources})
+1 -1
View File
@@ -20,7 +20,7 @@ if(NOT ANDROID AND NOT APPLE)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.9)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.0.999)
set_property(SOURCE ${sources} ${sources_gl} ${sources_vulkan}
APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-cast-function-type-mismatch")
endif()