Updated warning options for GCC; fixed new warnings.

This commit is contained in:
Andrey Kamaev
2012-06-20 12:27:02 +00:00
parent 779f4e39de
commit d48d7b2b46
50 changed files with 2055 additions and 1808 deletions

View File

@@ -58,6 +58,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX)
# High level of warnings.
add_extra_compiler_option(-W)
add_extra_compiler_option(-Wall)
add_extra_compiler_option(-Werror=return-type)
add_extra_compiler_option(-Werror=non-virtual-dtor)
@@ -72,6 +73,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Winit-self)
add_extra_compiler_option(-Wpointer-arith)
add_extra_compiler_option(-Wshadow)
add_extra_compiler_option(-Wsign-promo)
if(ENABLE_NOISY_WARNINGS)
add_extra_compiler_option(-Wcast-align)
@@ -81,6 +83,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
add_extra_compiler_option(-Wno-unnamed-type-template-args)
endif()
add_extra_compiler_option(-fdiagnostics-show-option)
# The -Wno-long-long is required in 64bit systems when including sytem headers.
if(X86_64)