From 52c7357fced9f10fafba68344781ceab48fc1b16 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 18 Mar 2024 08:57:49 +0100 Subject: [PATCH] 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 Reviewed-by: Thiago Macieira --- configure.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.cmake b/configure.cmake index 942c359c0dd..1e144ac37c0 100644 --- a/configure.cmake +++ b/configure.cmake @@ -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()