MSVC: Enable warnings-are-errors for latest Visual Studio 2019
Also remove handling of older versions, because we only support Visual Studio 2019 currently Pick-to: 6.2 Change-Id: If66a46d970047fe25582e323df74e0a904ee92da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
7efacc7cbe
commit
d0676874d6
@ -70,10 +70,9 @@ function(qt_internal_set_warnings_are_errors_flags target)
|
||||
endif()
|
||||
endif()
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# In qmake land, currently warnings as errors are only enabled for
|
||||
# MSVC 2012, 2013, 2015.
|
||||
# Respectively MSVC_VERRSIONs are: 1700-1799, 1800-1899, 1900-1909.
|
||||
if(MSVC_VERSION GREATER_EQUAL 1700 AND MSVC_VERSION LESS_EQUAL 1909)
|
||||
# Only enable for versions of MSVC that are known to work
|
||||
# 1929 is Visual Studio 2019 version 16.0
|
||||
if(MSVC_VERSION LESS_EQUAL 1929)
|
||||
list(APPEND flags /WX)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user