aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2009-03-18 20:51:13 +0100
committerXTZGZoReX <none@none>2009-03-18 20:51:13 +0100
commitced575a3f3b458191273f0baa1d0761ff6aa31db (patch)
treeb051f15f2c900815576fb242dd40a2f23df76379
parent5184783bd165bec038273fa5cfbc593716856fc2 (diff)
* Added DO_WARN (-DDO_WARN=1) option to CMake. This can help find/remove warnings.
--HG-- branch : trunk
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7ae5400c6b..d6571159276 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ OPTION(DO_SCRIPTS "With trinityscripts" 1)
OPTION(DO_CLI "With CLI" 1)
OPTION(DO_RA "With RA" 0)
OPTION(DO_DEBUG "Debug mode" 0)
+OPTION(DO_WARN "Enable all compile warnings" 0)
OPTION(LARGE_CELL "Large cell size" 0)
OPTION(SHORT_SLEEP "Short sleep" 0)
@@ -104,6 +105,11 @@ message("* Debug mode ON")
add_definitions(-g -DTRINITY_DEBUG)
endif(DO_DEBUG)
+if(DO_WARN)
+ message("* All warnings mode")
+ add_definitions(-Wall -Wfatal-errors -Wextra)
+endif(DO_WARN)
+
if(LARGE_CELL)
message("* Large cell size")
add_definitions(-DLARGE_CELL)