minor tweaks for the extra warnings so the giant list isn't repeated
authortuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Mon, 7 Dec 2009 16:00:10 +0000 (16:00 +0000)
committertuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Mon, 7 Dec 2009 16:00:10 +0000 (16:00 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6193 837edb03-e0f3-0310-88ca-d4d4e8b29345

CMakeLists.txt

index 00b9874..10b3e96 100644 (file)
@@ -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)