From ab49ab4191feea2f87b3e1daf2916c8847259ee5 Mon Sep 17 00:00:00 2001 From: Tim Goya Date: Mon, 7 Dec 2009 16:00:10 +0000 Subject: [PATCH] minor tweaks for the extra warnings so the giant list isn't repeated SVN-Revision: 6193 --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.11.0