Permalink
Browse files

Add compiler flags for warnings (GCC)

  • Loading branch information...
1 parent 99d76f0 commit 588049014246c61c6f1b64309bae01b9c80652e4 @rouault rouault committed Jul 7, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 CMakeLists.txt
View
@@ -152,6 +152,13 @@ option(WITH_GENERIC_NINT "generic rounding" OFF)
#TODO: USE_OGL? , USE_SDE, USE_CLUSTER_EXTERNAL USE_CLUSTER_PLUGIN, USE_MSSQL2008, USE_MSSQL2008_PLUGIN
# SIGNORE_MISSING_DATA, CGI_CL_DEBUG_ARGS, EXTRA DEBUG FLAGS?,
# PERLV_ld_DETECT?
+
+# Add compiler flags for warnings
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wdeclaration-after-statement")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+endif()
+
if(LINK_STATIC_LIBMAPSERVER)
set(BUILD_STATIC 1)
set(MAPSERVER_LIBMAPSERVER mapserver_static)

0 comments on commit 5880490

Please sign in to comment.