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:
-rw-r--r--CMakeLists.txt1
-rw-r--r--build_files/scons/config/linux2-config.py2
-rw-r--r--extern/CMakeLists.txt3
-rw-r--r--source/blender/CMakeLists.txt5
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt3
5 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67dd7e40100..46977d780f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -318,6 +318,7 @@ IF(UNIX AND NOT APPLE)
SET(PLATFORM_LINKFLAGS "-pthread")
# Better warnings
+ # note: -Wunused-parameter should be added but for now only apply to ./source/blender
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
diff --git a/build_files/scons/config/linux2-config.py b/build_files/scons/config/linux2-config.py
index a9c74d692d7..f3e0085125a 100644
--- a/build_files/scons/config/linux2-config.py
+++ b/build_files/scons/config/linux2-config.py
@@ -204,7 +204,7 @@ REL_CCFLAGS = ['-O2']
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index b15c8a31c73..61acff4cfe4 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -24,6 +24,9 @@
#
# ***** END GPL LICENSE BLOCK *****
+# Otherwise we get warnings here that we cant fix in external projects
+STRING(REGEX REPLACE "-Wunused-parameter" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+
IF(WITH_BULLET)
ADD_SUBDIRECTORY(bullet2)
ENDIF(WITH_BULLET)
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 96d1ce3e8b2..dc0640c817f 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -24,6 +24,11 @@
#
# ***** END GPL LICENSE BLOCK *****
+# 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")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(editors)
ADD_SUBDIRECTORY(avi)
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 4f9032ffc95..a48603e623c 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -24,6 +24,9 @@
#
# ***** END GPL LICENSE BLOCK *****
+# this warning on generated files gets annoying
+STRING(REGEX REPLACE "-Wunused-parameter" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+
FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)