[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble
From:       Jens-Michael Hoffmann <jensmh () gmx ! de>
Date:       2010-08-26 21:17:09
Message-ID: 20100826211709.A9BC6AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1168523 by jmhoffmann:

Enable warnings by default, only leave -Werror for "PEDANTIC" mode.

This also adds a check for the compiler so that these (as far as I know)
gcc-specific options are not enabled for MSVC.

 M  +8 -6      CMakeLists.txt  


--- trunk/KDE/kdeedu/marble/CMakeLists.txt #1168522:1168523
@@ -227,14 +227,16 @@
 
 
 #############################################################
-# In pedantic mode, enable warnings, halt compile on warnings
-# Its good programming practice to build with no warnings....
+if (not MSVC)
+    # Its good programming practice to build with no warnings...
+    add_definitions( -Wall -Wextra -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Wno-long-long
+                     -Wchar-subscripts -Wcast-align -Wpointer-arith -Wformat-security )
+
+    # In pedantic mode, treat warnings as errors
 if (PEDANTIC)
-  ADD_DEFINITIONS( -W -Wall -Werror -Wundef
-                   -Wnon-virtual-dtor -Woverloaded-virtual
-                   -Wno-long-long -Wchar-subscripts
-                   -Wcast-align -Wpointer-arith -Wformat-security )
+        add_definitions( -Werror )
 endif (PEDANTIC)
+endif (not MSVC)
 
 #############################################################
 # Add a compiler def so that we can conditionally compile
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic