[Bf-blender-cvs] [23284e4dde5] blender2.8: add: visual studio Compiler warning (order of attribute init in c++ constructors)

Gaia Clary noreply at git.blender.org
Thu Nov 29 18:33:58 CET 2018


Commit: 23284e4dde5e759d082e82d6cb666cb10f43e716
Author: Gaia Clary
Date:   Thu Nov 29 16:56:33 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB23284e4dde5e759d082e82d6cb666cb10f43e716

add: visual studio Compiler warning (order of attribute init in c++ constructors)

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

M	CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ccc6d54c9a4..5741588b6af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1458,6 +1458,11 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
 		"/we4431"  # missing type specifier - int assumed
 	)
 
+	if(MSVC_VERSION GREATER_EQUAL 1911)
+		# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
+		set(_WARNINGS "${_WARNINGS} /w35038") #order of initialisation in c++ constructors
+	endif()
+
 	string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
 	set(C_WARNINGS "${_WARNINGS}")
 	set(CXX_WARNINGS "${_WARNINGS}")



More information about the Bf-blender-cvs mailing list