Fix headers clean for newer msvc

Newer msvc gives C4309 warning for 'initializing':
truncation of constant value

Warning would go away if we had 'enum foo: unsigned'.
Disable the warning for problematic enums is not enough
as it also complains about headers coming from windows sdk
like:

C:\Program Files (x86)\Windows
Kits\10\include\10.0.22621.0\shared\wtypesbase.h(395): warning C4309:
'initializing': truncation of constant value

Note 10.0.22621.0 is the latest sdk already.

Do not disable language extensions for header clean target.

This reverts commit 8bf602518d

Task-number: COIN-1059
Fixes: QTBUG-114931
Pick-to: 6.6
Change-Id: Ifc3883f88a6bd52794a37dc640eca99c158a40e0
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This commit is contained in:
Michal Klocek 2023-06-28 14:08:46 +02:00 committed by Kai Köhne
parent 0644f8e63a
commit 2dcc30592b

View File

@ -182,7 +182,7 @@ function(qt_internal_add_headersclean_target module_target module_headers)
)
set(input_header_path_type ABSOLUTE)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(hcleanFLAGS -std:c++latest -Zc:__cplusplus -Za -WX -W3 -EHsc)
set(hcleanFLAGS -std:c++latest -Zc:__cplusplus -WX -W3 -EHsc)
# Because we now add `-DNOMINMAX` to `PlatformCommonInternal`.
set(hcleanUDEFS -UNOMINMAX)