Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -231,6 +231,18 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension") endif () +check_cxx_compiler_flag("-Wno-gnu-anonymous-struct" + CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT) +if (CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-anonymous-struct") +endif () + +check_cxx_compiler_flag("-Wno-nested-anon-types" + CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT) +if (CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types") +endif () + # Disable MSVC warnings if( MSVC ) add_definitions(