Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -114,6 +114,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register") endif () +check_cxx_compiler_flag("-Wno-vla-extension" + CXX_SUPPORTS_NO_VLA_EXTENSION) +if (CXX_SUPPORTS_NO_VLA_EXTENSION) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension") +endif () + # Disable MSVC warnings if( MSVC ) add_definitions( Index: tools/debugserver/source/CMakeLists.txt =================================================================== --- tools/debugserver/source/CMakeLists.txt +++ tools/debugserver/source/CMakeLists.txt @@ -16,12 +16,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") endif () -check_cxx_compiler_flag("-Wno-vla-extension" - CXX_SUPPORTS_NO_VLA_EXTENSION) -if (CXX_SUPPORTS_NO_VLA_EXTENSION) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension") -endif () - check_cxx_compiler_flag("-Wno-zero-length-array" CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY) if (CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)