Meta: Move compiler-specific warnings into the appropriate if clause

This commit is contained in:
Daniel Bertalan 2021-12-11 07:40:22 +01:00 committed by Brian Gianforcaro
parent 4a81b33c07
commit 52e4753722
Notes: sideshowbarker 2024-07-17 22:58:45 +09:00

View file

@ -161,11 +161,8 @@ add_compile_options(-Wsuggest-override)
add_compile_options(-Wno-unknown-warning-option)
add_compile_options(-Wundef)
add_compile_options(-Wunused)
add_compile_options(-Wno-unused-private-field)
add_compile_options(-Wno-unused-const-variable)
add_compile_options(-Wno-unused-command-line-argument)
add_compile_options(-Wwrite-strings)
add_compile_options(-Wno-maybe-uninitialized)
add_compile_options(-fdiagnostics-color=always)
add_compile_options(-fno-delete-null-pointer-checks)
@ -179,6 +176,7 @@ add_compile_options(-g1)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-literal-suffix)
add_compile_options(-Wno-maybe-uninitialized)
add_compile_options(-Wcast-align)
add_compile_options(-Wdouble-promotion)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
@ -191,7 +189,9 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
add_compile_options(-Wno-tautological-constant-out-of-range-compare)
add_compile_options(-Wno-unneeded-internal-declaration)
add_compile_options(-Wno-unused-but-set-variable)
add_compile_options(-Wno-unused-const-variable)
add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-unused-private-field)
add_compile_options(-fno-aligned-allocation)
add_compile_options(-fconstexpr-steps=16777216)