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>2013-03-14 17:00:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-14 17:00:00 +0400
commit57a28cd4ff45f3d692db9fd46b29e6ffd49b497b (patch)
treec5981c55123d995f76df8712ed4651df872b3ed7 /CMakeLists.txt
parent63d3594975cde6fd80e503fd433dab6ac3f6223a (diff)
disable -Wredundant-decls for gcc versions older then 4.6
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2f6d92eddd..a6ab7896ce8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1924,13 +1924,17 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull) # C only
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
- ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS -Wredundant-decls)
# gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
endif()
+ # versions before gcc4.6 give many BLI_math warnings
+ if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6")
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS -Wredundant-decls)
+ endif()
+
# disable because it gives warnings for printf() & friends.
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)