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

This commit is contained in:
Gaia Clary 2018-11-29 16:56:33 +01:00
parent e03eaf5b81
commit 23284e4dde

@ -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}")