Clang: improve usefullness of clang-warnings

- don't check c++98 compatibility
 - don't show warnings on third-party code
 - don't check for padding
This commit is contained in:
Adriaan de Groot 2017-06-21 07:10:38 -04:00 committed by Philip
parent 69f51cb909
commit f2fd8c744b
2 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-padded" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
set( CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG" )

View File

@ -1,3 +1,8 @@
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Suppress warnings entirely; not interesting in third-party code
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w" )
endif()
if( WITH_CRASHREPORTER )
macro( qt_wrap_ui )
qt5_wrap_ui( ${ARGN} )