From: tuxdev Date: Mon, 7 Dec 2009 16:00:10 +0000 (+0000) Subject: minor tweaks for the extra warnings so the giant list isn't repeated X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5429d4e616d0d29ab5510eba65fe283c35fee442;p=supertux.git minor tweaks for the extra warnings so the giant list isn't repeated git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6193 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 00b9874a8..10b3e9684 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,7 @@ IF(PRECOMPILE_HEADERS) ) ## Make certain it is built SET(SUPERTUX_SOURCES_CXX ${CMAKE_CURRENT_BINARY_DIR}/precompile.hh.gch ${SUPERTUX_SOURCES_CXX}) - SET(CMAKE_CXX_FLAGS "-include ${CMAKE_CURRENT_BINARY_DIR}/precompile.hh" ${CMAKE_CXX_FLAGS}) + SET(CMAKE_CXX_FLAGS "-include ${CMAKE_CURRENT_BINARY_DIR}/precompile.hh ${CMAKE_CXX_FLAGS}") ELSE(PRECOMPILE_HEADERS) IF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/precompile.hh) FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/precompile.hh) @@ -185,20 +185,20 @@ ENDIF(PRECOMPILE_HEADERS) OPTION(WERROR "Stop on first compiler warning" OFF) OPTION(WARNINGS "Enable long list of warnings for compiler to check" ON) IF(CMAKE_COMPILER_IS_GNUCC) - ADD_DEFINITIONS(-Wall -Wextra -funit-at-a-time) SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_CXX_FLAGS_PROFILE "-pg") SET(CMAKE_C_FLAGS_PROFILE "-pg") SET(CMAKE_LD_FLAGS_PROFILE "-pg") + ADD_DEFINITIONS(-Wall -Wextra -funit-at-a-time) IF(WERROR) ADD_DEFINITIONS(-Werror) ELSE(WERROR) REMOVE_DEFINITIONS(-Werror) ENDIF(WERROR) IF(WARNINGS) - SET(CMAKE_C_FLAGS "-fdiagnostics-show-option -pedantic -Wno-long-long -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector") - SET(CMAKE_CXX_FLAGS "-fdiagnostics-show-option -pedantic -Wno-long-long -Weffc++ -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector") + ADD_DEFINITIONS(-fdiagnostics-show-option -pedantic -Wno-long-long -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector) + SET(CMAKE_CXX_FLAGS "-Weffc++ -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel ${CMAKE_CXX_FLAGS}") # -ansi fails in MinGW # still left: -Wold-style-cast -Wpadded -Wconversion -Wundef -Wsign-conversion -Wshadow -Winline -Wunsafe-loop-optimizations -Wfloat-equal -Wswitch-default -Wswitch-enum -Wcast-qual -Wsign-promo -Woverloaded-virtual -Wmissing-format-attribute -Wstrict-overflow=5 -Wformat=2 ENDIF(WARNINGS)