[CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types.
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Nov 2019 00:45:55 +0000 (16:45 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Nov 2019 00:58:40 +0000 (16:58 -0800)
We're checking for support but we're discarding the result. My best
guess is that these warnings were disabled in the past. However, I don't
see a reason to keep it that way.

lldb/cmake/modules/LLDBConfig.cmake

index 2a709f8..5e45eb5 100644 (file)
@@ -365,9 +365,15 @@ 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_NESTED_ANON_TYPES)
+if (CXX_SUPPORTS_NO_NESTED_ANON_TYPES)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types")
+endif ()
 
 # Disable MSVC warnings
 if( MSVC )