Commit: 5cce2e1cfe39ed1cf9333c764581419c3acbda63
Author: Martijn Berger
Date:   Sat Nov 8 21:17:04 2014 +0100
Branches: master
https://developer.blender.org/rB5cce2e1cfe39ed1cf9333c764581419c3acbda63

Cmake cleanup
Move compiler warnings for msvc to common compilerwarnings.

===================================================================

M       CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index abf2e6c..260d797 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1111,30 +1111,6 @@ elseif(WIN32)
                set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /MT /MP" CACHE STRING 
"MSVC MT flags " FORCE)
                set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi /MP" CACHE 
STRING "MSVC MT flags " FORCE)
 
-               # most msvc warnings are C & C++
-               set(_WARNINGS
-                       # warning level:
-                       "/W3"
-                       "/w34062"  # switch statement contains 'default' but no 
'case' labels
-                       # disable:
-                       "/wd4018"  # signed/unsigned mismatch
-                       "/wd4065"  # switch statement contains 'default' but no 
'case' labels
-                       "/wd4127"  # conditional expression is constant
-                       "/wd4181"  # qualifier applied to reference type; 
ignored
-                       "/wd4200"  # zero-sized array in struct/union
-                       "/wd4244"  # conversion from 'type1' to 'type2', 
possible loss of data
-                       "/wd4267"  # conversion from 'size_t' to 'type', 
possible loss of data
-                       "/wd4305"  # truncation from 'type1' to 'type2'
-                       "/wd4800"  # forcing value to bool 'true' or 'false'
-                       # errors:
-                       "/we4013"  # 'function' undefined; assuming extern 
returning int
-                       "/we4431"  # missing type specifier - int assumed
-               )
-
-               string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
-               set(C_WARNINGS "${_WARNINGS}")
-               set(CXX_WARNINGS "${_WARNINGS}")
-               unset(_WARNINGS)
 
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 
/INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib 
/NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
 
@@ -2510,7 +2486,31 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
        # disable numbered, false positives
        set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556")
        set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556")
+elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
+       # most msvc warnings are C & C++
+       set(_WARNINGS
+               # warning level:
+               "/W3"
+               "/w34062"  # switch statement contains 'default' but no 'case' 
labels
+               # disable:
+               "/wd4018"  # signed/unsigned mismatch
+               "/wd4065"  # switch statement contains 'default' but no 'case' 
labels
+               "/wd4127"  # conditional expression is constant
+               "/wd4181"  # qualifier applied to reference type; ignored
+               "/wd4200"  # zero-sized array in struct/union
+               "/wd4244"  # conversion from 'type1' to 'type2', possible loss 
of data
+               "/wd4267"  # conversion from 'size_t' to 'type', possible loss 
of data
+               "/wd4305"  # truncation from 'type1' to 'type2'
+               "/wd4800"  # forcing value to bool 'true' or 'false'
+               # errors:
+               "/we4013"  # 'function' undefined; assuming extern returning int
+               "/we4431"  # missing type specifier - int assumed
+       )
 
+       string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
+       set(C_WARNINGS "${_WARNINGS}")
+       set(CXX_WARNINGS "${_WARNINGS}")
+       unset(_WARNINGS)
 endif()
 
 # ensure python header is found since detection can fail, this could happen

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

Reply via email to