diff options
author | Tim Ebringer <tde@slowdogs.com.au> | 2017-10-21 09:40:32 -0400 |
---|---|---|
committer | Tim Ebringer <tde@slowdogs.com.au> | 2017-10-21 09:40:32 -0400 |
commit | a23669c2f613b95dfd675bba369106304ba7ba6a (patch) | |
tree | f2116aa3a2b8e5961b7a7d4073c95056e341d83c /cmake | |
parent | 2a7284042531771b6c00a1e6fd1d0d36738266ac (diff) |
Sort MSVC warning suppressions
Add brief documentation describing each warning suppression.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 9e2912e0..f159f60e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -135,7 +135,23 @@ endif (protobuf_BUILD_SHARED_LIBS) if (MSVC) # Build with multiple processes add_definitions(/MP) - add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4309 /wd4065 /wd4506 /wd4307 /wd4334) + # MSVC warning suppressions + add_definitions( + /wd4018 # 'expression' : signed/unsigned mismatch + /wd4065 # switch statement contains 'default' but no 'case' labels + /wd4146 # unary minus operator applied to unsigned type, result still unsigned + /wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data + /wd4251 # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' + /wd4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data + /wd4305 # 'identifier' : truncation from 'type1' to 'type2' + /wd4307 # 'operator' : integral constant overflow + /wd4309 # 'conversion' : truncation of constant value + /wd4334 # 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) + /wd4355 # 'this' : used in base member initializer list + /wd4506 # no definition for inline function 'function' + /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning) + /wd4996 # The compiler encountered a deprecated declaration. + ) # Allow big object add_definitions(/bigobj) string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) |