clang/cmake - quiet warnings for external libs and reference moto as a system include.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 15 Jul 2013 08:26:16 +0000 (08:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 15 Jul 2013 08:26:16 +0000 (08:26 +0000)
19 files changed:
CMakeLists.txt
build_files/cmake/macros.cmake
intern/bsp/CMakeLists.txt
intern/iksolver/CMakeLists.txt
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Network/CMakeLists.txt
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Dummy/CMakeLists.txt
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/SceneGraph/CMakeLists.txt
source/gameengine/VideoTexture/CMakeLists.txt

index acd01f4..b1a7830 100644 (file)
@@ -2053,6 +2053,20 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
        ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS    -Wno-unused-macros)
 
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
+
+       ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
+       ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
+       ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
+       ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
+       ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
+
 elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
 
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
index 109d924..854609f 100644 (file)
@@ -530,7 +530,9 @@ macro(remove_strict_flags_file
 
        foreach(_SOURCE ${ARGV})
 
-               if(CMAKE_COMPILER_IS_GNUCC)
+               if(CMAKE_COMPILER_IS_GNUCC OR
+                 (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+
                        set_source_files_properties(${_SOURCE}
                                PROPERTIES
                                        COMPILE_FLAGS "${CC_REMOVE_STRICT_FLAGS}"
index e3907c5..5a2e353 100644 (file)
@@ -28,10 +28,10 @@ set(INC
        ../container
        ../guardedalloc
        ../memutil
-       ../moto/include
 )
 
 set(INC_SYS
+       ../moto/include
        ../../extern/carve/include
 )
 
index 711a70f..9476e03 100644 (file)
 set(INC
        intern
        ../memutil
-       ../moto/include
 )
 
 set(INC_SYS
-
+       ../moto/include
 )
 
 set(SRC
index 32efc5b..6773970 100644 (file)
@@ -25,11 +25,11 @@ set(INC
        ../../blender/windowmanager
        ../../../intern/container
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
+       ../../../intern/moto/include
        ${PTHREADS_INCLUDE_DIRS}
        ${GLEW_INCLUDE_PATH}
        ${BOOST_INCLUDE_DIR}
index f18646c..084a85c 100644 (file)
@@ -51,11 +51,11 @@ set(INC
        ../../blender/windowmanager
        ../../../intern/container
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
+       ../../../intern/moto/include
        ../../../extern/recastnavigation/Detour/Include
        ../../../extern/Eigen3
        ${PTHREADS_INCLUDE_DIRS}
index 0c7d79b..6907f31 100644 (file)
@@ -28,12 +28,11 @@ set(INC
        ../SceneGraph
        ../../blender/blenlib
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index ad357bd..05071f5 100644 (file)
@@ -30,13 +30,12 @@ set(INC
        ../SceneGraph
        ../../blender/blenlib
        ../../../intern/container
-       ../../../intern/moto/include
        ../../../intern/string
        ../../../intern/ghost
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index 8884ff8..e7d4fc3 100644 (file)
@@ -48,18 +48,18 @@ set(INC
        ../../../../intern/container
        ../../../../intern/ghost
        ../../../../intern/guardedalloc
-       ../../../../intern/moto/include
        ../../../../intern/string
 )
 
 set(INC_SYS
+       ../../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
        ${PYTHON_INCLUDE_DIRS}
        ${PNG_INCLUDE_DIR}
        ${ZLIB_INCLUDE_DIRS}
 )
 
-set(SRC 
+set(SRC
        GPC_Canvas.cpp
        GPC_Engine.cpp
        GPC_KeyboardDevice.cpp
index 0e9422c..4ac9e78 100644 (file)
@@ -49,16 +49,16 @@ set(INC
        ../../../../intern/container
        ../../../../intern/ghost
        ../../../../intern/guardedalloc
-       ../../../../intern/moto/include
        ../../../../intern/string
 )
 
 set(INC_SYS
+       ../../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
        ${PYTHON_INCLUDE_DIRS}
 )
 
-set(SRC 
+set(SRC
        GPG_Application.cpp
        GPG_Canvas.cpp
        GPG_KeyboardDevice.cpp
index 3baa72e..1f5fa4f 100644 (file)
@@ -50,16 +50,16 @@ set(INC
        ../../blender/python/mathutils
        ../../../intern/container
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
+       ../../../intern/moto/include
+       ../../../extern/recastnavigation/Recast/Include
+       ../../../extern/recastnavigation/Detour/Include
        ${PTHREADS_INCLUDE_DIRS}
        ${GLEW_INCLUDE_PATH}
        ${BOOST_INCLUDE_DIR}
-       ../../../extern/recastnavigation/Recast/Include
-       ../../../extern/recastnavigation/Detour/Include
 )
 
 set(SRC
index d5e2b37..0c661cf 100644 (file)
@@ -31,12 +31,11 @@ set(INC
        ../../Network
        ../../SceneGraph
        ../../../../intern/container
-       ../../../../intern/moto/include
        ../../../../intern/string
 )
 
 set(INC_SYS
-
+       ../../../../intern/moto/include
 )
 
 set(SRC
index e1390e4..bae00c4 100644 (file)
 set(INC
        .
        ../../../intern/container
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index 89d7f41..87d8510 100644 (file)
@@ -39,11 +39,11 @@ set(INC
        ../../../blender/makesdna
        ../../../../intern/container
        ../../../../intern/guardedalloc
-       ../../../../intern/moto/include
        ../../../../intern/string
 )
 
 set(INC_SYS
+       ../../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
        ${PYTHON_INCLUDE_DIRS}
 )
index 529a75b..692331f 100644 (file)
 set(INC
        .
        ../common
-       ../../../../intern/moto/include
 )
 
 set(INC_SYS
-
+       ../../../../intern/moto/include
 )
 
 set(SRC
index 3ea26c3..9061532 100644 (file)
@@ -33,11 +33,11 @@ set(INC
        ../../blender/blenkernel
        ../../../intern/container
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
+       ../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
        ${PYTHON_INCLUDE_DIRS}
 )
index d61f903..6b53990 100644 (file)
@@ -33,11 +33,11 @@ set(INC
        ../../../blender/gpu
        ../../../blender/makesdna
        ../../../../intern/container
-       ../../../../intern/moto/include
        ../../../../intern/string
 )
 
 set(INC_SYS
+       ../../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
 )
 
index 7b7f05d..bbad429 100644 (file)
 
 set(INC
        .
-       ../../../intern/moto/include
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index f436fec..3ca3917 100644 (file)
@@ -43,11 +43,11 @@ set(INC
        ../../../intern/container
        ../../../intern/ffmpeg
        ../../../intern/guardedalloc
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
+       ../../../intern/moto/include
        ${GLEW_INCLUDE_PATH}
 )