Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-17 12:04:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-17 12:04:28 +0400
commit952b728578bc0ecea22b3659067775102c0eea55 (patch)
treed8cddeca6435b7b0d467bd8778ecc81a44765efa /CMakeLists.txt
parent30b79ddcc6e2737add3a7ebd49b167c1776e4087 (diff)
Test stricter GCC compiler settings, these warnings will now give errors.
- implicit function declaration. - no return type set for a function. - declaration after statement. This may be too strict but in general I prefer we don't allow commits with these warnings. Applies to cmake/gcc and scons/linux.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53ee69bd3e8..6ed3cd788b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -920,10 +920,8 @@ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
#-----------------------------------------------------------------------------
# Extra compile flags
-
-# TODO: remove this and uncommend the global arg, but for now adding here keeps it managable
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
+ SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")