Skip to content

Commit

Permalink
headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC
Browse files Browse the repository at this point in the history
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.

Task-number: QTBUG-91117
Change-Id: Iaf1547191969213d570a1b2f59888ad04a7977ab
Reviewed-by: Joerg Bornemann <[email protected]>
(cherry picked from commit b58ca06)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
kkoehne authored and Qt Cherry-pick Bot committed Mar 30, 2021
1 parent 84364d8 commit 2d67ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/QtHeadersClean.cmake
Original file line number Diff line number Diff line change
@@ -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
# <windows.h> and <GL.h> 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)

0 comments on commit 2d67ce3

Please sign in to comment.