Add MSVC warning 5038 (Wreorder equivalent) to CMakeLists

This commit is contained in:
Martin Hořeňovský 2018-11-05 20:07:33 +01:00
parent c51f2edfb1
commit eccbffec0f

View File

@ -303,7 +303,7 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif() endif()
if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
STRING(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # override default warning level STRING(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # override default warning level
target_compile_options( SelfTest PRIVATE /w44265 /w44061 /w44062 ) target_compile_options( SelfTest PRIVATE /w44265 /w44061 /w44062 /w45038 )
if (CATCH_ENABLE_WERROR) if (CATCH_ENABLE_WERROR)
target_compile_options( SelfTest PRIVATE /WX) target_compile_options( SelfTest PRIVATE /WX)
endif() endif()