[Marble-commits] KDE/kdeedu/marble
Jens-Michael Hoffmann
jensmh at gmx.de
Thu Aug 26 23:17:09 CEST 2010
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
More information about the Marble-commits
mailing list