projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new oldschool growup sound
[supertux.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
7ed9a26
..
ca212d4
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-164,13
+164,18
@@
FILE(GLOB SUPERTUX_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/*.cpp src/audio/*
OPTION(DEBUG "Build with debugging options" OFF)
OPTION(PROFILE "Build with profiling information" OFF)
OPTION(DEBUG "Build with debugging options" OFF)
OPTION(PROFILE "Build with profiling information" OFF)
+OPTION(WERROR "Stops on first compiler warning in debug mode" ON)
IF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCC)
+ ADD_DEFINITIONS(-Wall -W)
IF (DEBUG)
REMOVE_DEFINITIONS(-O2)
IF (DEBUG)
REMOVE_DEFINITIONS(-O2)
- ADD_DEFINITIONS(-O0 -g -Wall -Werror)
+ ADD_DEFINITIONS(-O0 -g)
+ IF(WERROR)
+ ADD_DEFINITIONS(-Werror)
+ ENDIF(WERROR)
ELSE (DEBUG)
ADD_DEFINITIONS(-O2)
ELSE (DEBUG)
ADD_DEFINITIONS(-O2)
- REMOVE_DEFINITIONS(-O0 -g
-Wall -Werror
)
+ REMOVE_DEFINITIONS(-O0 -g)
ENDIF (DEBUG)
IF (PROFILE)
ADD_DEFINITIONS(-pg)
ENDIF (DEBUG)
IF (PROFILE)
ADD_DEFINITIONS(-pg)