CMake: Bail out on configuration with FEATURE_cxx20 and MSVC 2019

45fd36f1480a6229879a4e59236ffa1d1d22dfbf triggers internal
compiler errors in MSVC2019 when configuring Qt with -c++std c++20. Bail
out early when trying to configure a C++20 build with MSVC 2019.

Change-Id: Ic0a49c43e08d3d46221c5c060c0b92628898e26e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Joerg Bornemann 2024-03-18 08:57:49 +01:00
parent c1ce543fb2
commit 52c7357fce

View File

@ -1407,6 +1407,11 @@ qt_configure_add_report_entry(
MESSAGE "You should use the recommended Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt. You have ${EMCC_VERSION}."
CONDITION WASM AND NOT ${EMCC_VERSION} MATCHES ${QT_EMCC_RECOMMENDED_VERSION}
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Building Qt with C++20 is not supported with MSVC 2019."
CONDITION QT_FEATURE_cxx20 AND MSVC AND MSVC_VERSION LESS "1930"
)
if(WASM)
qt_extra_definition("QT_EMCC_VERSION" "\"${EMCC_VERSION}\"" PUBLIC)
endif()