From 2dcc30592bccd2e6990b25b89490f3c1fe293d78 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 28 Jun 2023 14:08:46 +0200 Subject: [PATCH] Fix headers clean for newer msvc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 8bf602518d8440542329d867c1a710b66ae12c36 Task-number: COIN-1059 Fixes: QTBUG-114931 Pick-to: 6.6 Change-Id: Ifc3883f88a6bd52794a37dc640eca99c158a40e0 Reviewed-by: Kai Köhne --- cmake/QtHeadersClean.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake index 98e3d0fa470..53cd00358c4 100644 --- a/cmake/QtHeadersClean.cmake +++ b/cmake/QtHeadersClean.cmake @@ -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)