# HG changeset patch
# User koda
# Date 1246980283 0
# Node ID d7b5c65f754421f3d214ac8b18a0a8962345b030
# Parent  1a0d264083243ab7a3297f48d5a8155d5a54f6d1
move C and C++ optimization flags in the main CMakeLists.txt

diff -r 1a0d26408324 -r d7b5c65f7544 CMakeLists.txt
--- a/CMakeLists.txt	Tue Jul 07 11:56:02 2009 +0000
+++ b/CMakeLists.txt	Tue Jul 07 15:24:43 2009 +0000
@@ -45,6 +45,15 @@
 	set(HAVE_NETSERVER false)
 endif(WITH_SERVER)
 
+#set default flags values for all the project
+set(CMAKE_C_FLAGS "-Wall -pipe")
+set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
+set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
+set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+
+
 add_subdirectory(bin)
 add_subdirectory(openalbridge)
 add_subdirectory(QTfrontend)
diff -r 1a0d26408324 -r d7b5c65f7544 QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Tue Jul 07 11:56:02 2009 +0000
+++ b/QTfrontend/CMakeLists.txt	Tue Jul 07 15:24:43 2009 +0000
@@ -18,18 +18,12 @@
 # Configure for SDL
 find_package(SDL REQUIRED)
 
+include_directories(.)
 include_directories(${SDL_INCLUDE_DIR})
-
 if(UNIX)
 	include_directories("/usr/local/include") # HACK: in freebsd cannot find iconv.h included via SDL.h
 endif(UNIX)
 
-# Done
-include_directories(.)
-
-set(CMAKE_CXX_FLAGS "-Wall -pipe")
-set(CMAKE_CXX_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 
 if(WIN32 AND NOT UNIX)
 	set(HEDGEWARS_BINDIR ".")
@@ -43,6 +37,7 @@
 	endif(DEFINED DATA_INSTALL_DIR)
 endif(WIN32 AND NOT UNIX)
 
+
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
 
 set(hwfr_src
diff -r 1a0d26408324 -r d7b5c65f7544 hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Tue Jul 07 11:56:02 2009 +0000
+++ b/hedgewars/CMakeLists.txt	Tue Jul 07 15:24:43 2009 +0000
@@ -67,10 +67,6 @@
 	FIND_PACKAGE(SDL)
 
 	if (SDL_FOUND)
-		set(CMAKE_C_FLAGS "-Wall -pipe")
-		set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
-		set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-
 		set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
 		include_directories(${SDL_INCLUDE_DIR})
 		link_libraries(${SDL_LIBRARY})
diff -r 1a0d26408324 -r d7b5c65f7544 openalbridge/CMakeLists.txt
--- a/openalbridge/CMakeLists.txt	Tue Jul 07 11:56:02 2009 +0000
+++ b/openalbridge/CMakeLists.txt	Tue Jul 07 15:24:43 2009 +0000
@@ -3,11 +3,6 @@
 include_directories(${OPENAL_INCLUDE_DIR})
 include_directories(${OGGVORBIS_INCLUDE_DIRS})
 
-#set flag configuration for build type
-set(CMAKE_C_FLAGS "-Wall -pipe")
-set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
-set(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG")
-
 #set destination directory for library
 set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})