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:
authorMartijn Berger <mberger@denc.nl>2014-11-08 23:17:04 +0300
committerMartijn Berger <mberger@denc.nl>2014-11-08 23:17:43 +0300
commit5cce2e1cfe39ed1cf9333c764581419c3acbda63 (patch)
tree6760d2cda034aed37964bab9055ad3c784336224
parent67766f7715a017fc20b2cba9892cdb3ab093f035 (diff)
Cmake cleanup
Move compiler warnings for msvc to common compilerwarnings.
-rw-r--r--CMakeLists.txt48
1 files changed, 24 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abf2e6c188d..260d797531d 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