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 acd01f43fcdc0f5ba8ab99956ea8f086d6510324..b1a7830434e4198f8e88bcfadcbef79546dcdd2e 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 109d9244b3a08d3512f1920e8b6d8aee94e09981..854609f1665a06345fa52c163a3d2127bfd87569 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 e3907c5273dcf6881224ba7a0f3deb07e9d920c8..5a2e3538e0aee97c286a1d699d41aa4ddedd5afd 100644 (file)
@@ -28,10 +28,10 @@ set(INC
        ../container
        ../guardedalloc
        ../memutil
-       ../moto/include
 )
 
 set(INC_SYS
+       ../moto/include
        ../../extern/carve/include
 )
 
index 711a70ff2600f09b8ca4d95687f35b6c14caf7e1..9476e0379e9d22cce0fccef1997bcdfac4ad57fc 100644 (file)
 set(INC
        intern
        ../memutil
-       ../moto/include
 )
 
 set(INC_SYS
-
+       ../moto/include
 )
 
 set(SRC
index 32efc5bde21997591267d5b4c7f17e4610282171..67739706e3c3b1cf96ddd0235dd308a45c82a82b 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 f18646c1de03dcbc9913139ae28d8f6f5cc0a2a9..084a85c8a1f3bfb30cc8d3b8f3e1f0cb2dde5b1d 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 0c7d79b4cda2c25d27a6a3e539300f778dce9bcb..6907f314503f37fff03422edebf9a08940cad800 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 ad357bd015b0c0314e47c5eb63dd6e6f7ebee8db..05071f5970738a9753aff36c6cdffe59d7e734ad 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 8884ff8236357a9adb0beeffb16dc8551673127c..e7d4fc3dbce3418bf7d5ba3cb522fec4b2c2aa46 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 0e9422c07aa9410506bcbfbdb06a673d85858404..4ac9e78232eb58348fc0accabb285efae2d35935 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 3baa72eb3c856a573b8d93412ec0c1e6861130ef..1f5fa4ff80ea09e108597394f7f4cc8f27a32bdc 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 d5e2b375c720acc5bf8b5d232ae3a793da7ddf50..0c661cf2c8799ae0843e314b24e3fa246fe372cf 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 e1390e4038234efae950e6b45fa6d24ec65b98eb..bae00c464f2cc4f41870159b64eb3c797bd2af68 100644 (file)
 set(INC
        .
        ../../../intern/container
-       ../../../intern/moto/include
        ../../../intern/string
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index 89d7f41ab4dc96501b2baf1c61dcc2ec34daef30..87d851016dd5e3911bea4ce7967d9bd40f1c78bd 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 529a75b2a62c3000d5943c635988057c92138194..692331f1ce471e3918ea4f5cf6e00f39bcabfdd1 100644 (file)
 set(INC
        .
        ../common
-       ../../../../intern/moto/include
 )
 
 set(INC_SYS
-
+       ../../../../intern/moto/include
 )
 
 set(SRC
index 3ea26c3be9dc1881b8d56c1c3974d49df1989b3c..9061532ba5d158c97c771714aa59c180ac53c68d 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 d61f90378bbd7cde13e61d846c50baf518bdb394..6b53990770f139c6b29f1954b78e82e84bc334ef 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 7b7f05da3e3fdb4ec0f0778934d6deec6b38b0dc..bbad429bbcd9d2be419c25af3af88211a19e8a35 100644 (file)
 
 set(INC
        .
-       ../../../intern/moto/include
 )
 
 set(INC_SYS
-
+       ../../../intern/moto/include
 )
 
 set(SRC
index f436fecf6b766532f0e702924edb00a87d8e5a5a..3ca3917cf6dd0f050b6a6c42d8f1380a9cdb6a74 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}
 )