Disable some more warnings from clang.

This commit is contained in:
Axel Naumann 2016-09-05 11:08:27 +02:00 committed by sftnight
parent 4a45f0bc51
commit 27b505e2a2

View File

@ -185,10 +185,12 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
endif ()
check_cxx_compiler_flag("-Werror -Wnested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)
if( CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types" )
endif()
foreach (check_flag "-Wno-nested-anon-types" "-Wno-covered-switch-default" "-Wno-unused-local-typedef")
check_cxx_compiler_flag(${check_flag} CXX_SUPPORTS_SOME_FLAG)
if (CXX_SUPPORTS_SOME_FLAG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${check_flag}")
endif ()
endforeach ()
endif ()
string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})