Author: akhaldi
Date: Thu May 28 12:19:24 2015
New Revision: 67941
URL: http://svn.reactos.org/svn/reactos?rev=67941&view=rev
Log:
[CMAKE] Do not treat C4189 as an error when compiling with VS 2010, or when in release mode.
Modified:
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/msvc.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=67941…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Thu May 28 12:19:24 2015
@@ -64,20 +64,21 @@
# - C4129: unrecognized escape sequence
# - TODO: C4133: incompatible types
# - C4163: 'identifier': not available as an intrinsic function
-# - C4189: local variable initialized but not referenced
# - C4229: modifiers on data are ignored
# - C4700: uninitialized variable usage
# - C4603: macro is not defined or definition is different after precompiled header use
# - C4716: function must return a value
-add_compile_flags("/we4013 /we4020 /we4022 /we4047 /we4098 /we4113 /we4129 /we4163 /we4189 /we4229 /we4700 /we4603 /we4716")
+add_compile_flags("/we4013 /we4020 /we4022 /we4047 /we4098 /we4113 /we4129 /we4163 /we4229 /we4700 /we4603 /we4716")
+
+# - C4189: local variable initialized but not referenced
+# Not in Release mode and not with MSVC 2010
+if((NOT CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT MSVC_VERSION LESS 1700))
+ add_compile_flags("/we4189")
+endif()
# Enable warnings above the default level, but don't treat them as errors:
# - C4115: named type definition in parentheses
add_compile_flags("/w14115")
-
-if(CMAKE_BUILD_TYPE STREQUAL "Release")
- add_compile_flags("/w14189")
-endif()
# Debugging
#if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")