Revision: 41377
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41377
Author:   campbellbarton
Date:     2011-10-30 04:48:00 +0000 (Sun, 30 Oct 2011)
Log Message:
-----------
correct flags for older GCC's which dont suppport -Wno-deprecated-declarations,
detect if the flag is supported before use

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/build_files/cmake/macros.cmake

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt        2011-10-30 03:57:46 UTC (rev 41376)
+++ trunk/blender/CMakeLists.txt        2011-10-30 04:48:00 UTC (rev 41377)
@@ -302,6 +302,9 @@
 set(C_WARNINGS)
 set(CXX_WARNINGS)
 
+# for gcc -Wno-blah-blah
+set(CC_REMOVE_STRICT_FLAGS)
+
 # libraries to link the binary with passed to target_link_libraries()
 # known as LLIBS to scons
 set(PLATFORM_LINKLIBS "")
@@ -1250,6 +1253,9 @@
        # # this causes too many warnings, disable
        # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
 
+       # flags to undo strict flags
+       ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS 
C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
+
 elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
 
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)

Modified: trunk/blender/build_files/cmake/macros.cmake
===================================================================
--- trunk/blender/build_files/cmake/macros.cmake        2011-10-30 03:57:46 UTC 
(rev 41376)
+++ trunk/blender/build_files/cmake/macros.cmake        2011-10-30 04:48:00 UTC 
(rev 41377)
@@ -434,7 +434,7 @@
                if(CMAKE_COMPILER_IS_GNUCC)
                        set_source_files_properties(${_SOURCE}
                                PROPERTIES
-                                       COMPILE_FLAGS 
"-Wno-deprecated-declarations"
+                                       COMPILE_FLAGS 
"${CC_REMOVE_STRICT_FLAGS}"
                        )
                endif()
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to