Skip to content

Commit 45b012d

Browse files
author
timlinux
committed
Build with -Wall -Werror now. Three directories still have unresolved warnings so this behaviour is disabled there (providers/wfs prviders/grass and plugins/grass). A nasty message is displayed during cmake configure process to remind that these errors must be resolved.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6626 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5d6c20b commit 45b012d

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
114114
#############################################################
115115
# enable warnings
116116

117-
ADD_DEFINITIONS( -Wall )
117+
ADD_DEFINITIONS( -Wall -Werror )
118118

119119
IF (CMAKE_BUILD_TYPE MATCHES Debug)
120120
ADD_DEFINITIONS(-DQGISDEBUG=1)

src/core/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ADD_FLEX_FILES(QGIS_CORE_SRCS qgssearchstringlexer.ll)
6969

7070
ADD_BISON_FILES(QGIS_CORE_SRCS qgssearchstringparser.yy)
7171

72-
# Disabe compiler warnings for lex generated sources
72+
# Disable compiler warnings for lex generated sources
7373
SET_SOURCE_FILES_PROPERTIES(
7474
${CMAKE_BINARY_DIR}/src/core/flex_qgssearchstringlexer.cpp
7575
PROPERTIES COMPILE_FLAGS -w)

src/plugins/grass/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ SUBDIRS(config modules themes)
33

44
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
55
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
6+
MESSAGE("plugins/grass : -Werror removed for this directory for now - please get rid of all warnings!")
7+
REMOVE_DEFINITIONS( -Werror )
68

79
########################################################
810
# Files

src/providers/grass/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
3+
MESSAGE("providers/grass : -Werror removed for this directory for now - please get rid of all warnings!")
4+
REMOVE_DEFINITIONS( -Werror )
35

46
########################################################
57
# Files

src/providers/wfs/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SET (WFS_MOC_HDRS
88
qgswfsdata.h
99
)
1010

11-
MESSAGE("-Werror removed for this directory for now - please get rid of all warnings!")
11+
MESSAGE("providers/wfs : -Werror removed for this directory for now - please get rid of all warnings!")
1212
REMOVE_DEFINITIONS( -Werror )
1313

1414
########################################################

tools/mapserver_export/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ SET (MSEXPORT_MOC_HDRS qgsmapserverexport.h)
1212

1313
SET (MSEXPORT_UIS qgsmapserverexportbase.ui)
1414

15+
# Disable compiler warnings for lex generated sources
16+
SET_SOURCE_FILES_PROPERTIES(
17+
${CMAKE_CURRENT_SOURCE_DIR}/msexport_wrap.cxx
18+
PROPERTIES COMPILE_FLAGS -w)
1519

1620
########################################################
1721
# Build

0 commit comments

Comments
 (0)