mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Disallow variable length arrays
This is a gcc/clang extension, not standard C++
This commit is contained in:
parent
2c22bb1a60
commit
cc0489f6b5
@ -209,6 +209,13 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
if(COMPILER_SUPPORTS_WSUGGEST_OVERRIDE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override")
|
||||
endif()
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG("-Wvla" COMPILER_SUPPORTS_WVLA)
|
||||
|
||||
if(COMPILER_SUPPORTS_WVLA)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=vla")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user