From b58ca067da7dad3e151231c58f60238ed01cb65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 18 Feb 2021 08:41:15 +0100 Subject: [PATCH] headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC c++latest does check that our headers also work with upcoming C++20 support in MSVC. It also implicitly sets -permissive-, which checks for stricter standards compliance. Pick-to: 6.1 Task-number: QTBUG-91117 Change-Id: Iaf1547191969213d570a1b2f59888ad04a7977ab Reviewed-by: Joerg Bornemann --- cmake/QtHeadersClean.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake index b6706f571db..d5d3f439edb 100644 --- a/cmake/QtHeadersClean.cmake +++ b/cmake/QtHeadersClean.cmake @@ -190,7 +190,7 @@ function(qt_internal_add_headers_clean_target elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # -Za would enable strict standards behavior, but we can't add it because # and violate the standards. - set(hcleanFLAGS -std:c++17 -WX -W3) + set(hcleanFLAGS -std:c++latest -Zc:__cplusplus -WX -W3) # cl.exe needs a source path get_filename_component(source_path "${QT_MKSPECS_DIR}/features/data/dummy.cpp" REALPATH)