mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Enable extra warnings in Source CMakeLists, not in root CMakeLists
Having extra warnings enabled for everything including external libraries produces an overwhelming amount of warnings in code that isn't even part of our codebase. Move the various warning flags to Source/CMakeLists.txt to get rid of those useless warnings. Note that the Source CMakeLists.txt is already where the MSVC warnings are defined, so this commit improves consistency as well.
This commit is contained in:
parent
fa73b1a23f
commit
ade9f92a63
@ -248,23 +248,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
||||
else()
|
||||
add_definitions(-D_DEFAULT_SOURCE)
|
||||
check_and_add_flag(HAVE_WALL -Wall)
|
||||
# TODO: would like these but they produce overwhelming amounts of warnings
|
||||
#check_and_add_flag(EXTRA -Wextra)
|
||||
#check_and_add_flag(MISSING_FIELD_INITIALIZERS -Wmissing-field-initializers)
|
||||
#check_and_add_flag(SWITCH_DEFAULT -Wswitch-default)
|
||||
#check_and_add_flag(FLOAT_EQUAL -Wfloat-equal)
|
||||
#check_and_add_flag(CONVERSION -Wconversion)
|
||||
#check_and_add_flag(ZERO_AS_NULL_POINTER_CONSTANT -Wzero-as-null-pointer-constant)
|
||||
check_and_add_flag(TYPE_LIMITS -Wtype-limits)
|
||||
check_and_add_flag(SIGN_COMPARE -Wsign-compare)
|
||||
check_and_add_flag(IGNORED_QUALIFIERS -Wignored-qualifiers)
|
||||
check_and_add_flag(UNINITIALIZED -Wuninitialized)
|
||||
check_and_add_flag(LOGICAL_OP -Wlogical-op)
|
||||
check_and_add_flag(SHADOW -Wshadow)
|
||||
check_and_add_flag(INIT_SELF -Winit-self)
|
||||
check_and_add_flag(MISSING_DECLARATIONS -Wmissing-declarations)
|
||||
check_and_add_flag(MISSING_VARIABLE_DECLARATIONS -Wmissing-variable-declarations)
|
||||
|
||||
# gcc uses some optimizations which might break stuff without this flag
|
||||
check_and_add_flag(NO_STRICT_ALIASING -fno-strict-aliasing)
|
||||
|
@ -66,6 +66,24 @@ if (MSVC)
|
||||
|
||||
# Don't include timestamps in binaries
|
||||
add_link_options(/Brepro)
|
||||
else()
|
||||
check_and_add_flag(HAVE_WALL -Wall)
|
||||
# TODO: would like these but they produce overwhelming amounts of warnings
|
||||
#check_and_add_flag(EXTRA -Wextra)
|
||||
#check_and_add_flag(MISSING_FIELD_INITIALIZERS -Wmissing-field-initializers)
|
||||
#check_and_add_flag(SWITCH_DEFAULT -Wswitch-default)
|
||||
#check_and_add_flag(FLOAT_EQUAL -Wfloat-equal)
|
||||
#check_and_add_flag(CONVERSION -Wconversion)
|
||||
#check_and_add_flag(ZERO_AS_NULL_POINTER_CONSTANT -Wzero-as-null-pointer-constant)
|
||||
check_and_add_flag(TYPE_LIMITS -Wtype-limits)
|
||||
check_and_add_flag(SIGN_COMPARE -Wsign-compare)
|
||||
check_and_add_flag(IGNORED_QUALIFIERS -Wignored-qualifiers)
|
||||
check_and_add_flag(UNINITIALIZED -Wuninitialized)
|
||||
check_and_add_flag(LOGICAL_OP -Wlogical-op)
|
||||
check_and_add_flag(SHADOW -Wshadow)
|
||||
check_and_add_flag(INIT_SELF -Winit-self)
|
||||
check_and_add_flag(MISSING_DECLARATIONS -Wmissing-declarations)
|
||||
check_and_add_flag(MISSING_VARIABLE_DECLARATIONS -Wmissing-variable-declarations)
|
||||
endif()
|
||||
|
||||
# These aren't actually needed for C11/C++11
|
||||
|
Loading…
x
Reference in New Issue
Block a user