From b6e7aad064962418083ac1a7c3d5335ce819898b Mon Sep 17 00:00:00 2001 From: Yuhang Zhao Date: Sat, 7 Oct 2023 14:10:36 +0800 Subject: [PATCH] MSVC: remove clang-cl parameters clang-cl share many parameters with MSVC, but it makes the CMake code complex. We temporarily remove the clang-cl compat code paths from the MSVC code and they will be brought back in a central place in a separate patch. Change-Id: I28b93c04d65e9a5133d61c7fbbdc5c83cc8cc37e Reviewed-by: Thiago Macieira --- cmake/QtInternalTargets.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index ec71ded3590..52ba63c7629 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -256,7 +256,7 @@ if(WASM AND QT_FEATURE_sse2) endif() # Taken from mkspecs/common/msvc-version.conf and mkspecs/common/msvc-desktop.conf -if (MSVC) +if (MSVC AND NOT CLANG) if (MSVC_VERSION GREATER_EQUAL 1799) target_compile_options(PlatformCommonInternal INTERFACE -FS @@ -267,20 +267,16 @@ if (MSVC) if (MSVC_VERSION GREATER_EQUAL 1899) target_compile_options(PlatformCommonInternal INTERFACE -Zc:strictStrings + -Zc:throwingNew ) - if (NOT CLANG) - target_compile_options(PlatformCommonInternal INTERFACE - -Zc:throwingNew - ) - endif() endif() - if (MSVC_VERSION GREATER_EQUAL 1909 AND NOT CLANG) # MSVC 2017 + if (MSVC_VERSION GREATER_EQUAL 1909) # MSVC 2017 target_compile_options(PlatformCommonInternal INTERFACE -Zc:referenceBinding -Zc:ternary ) endif() - if (MSVC_VERSION GREATER_EQUAL 1919 AND NOT CLANG) # MSVC 2019 + if (MSVC_VERSION GREATER_EQUAL 1919) # MSVC 2019 target_compile_options(PlatformCommonInternal INTERFACE -Zc:externConstexpr #-Zc:lambda # Buggy. TODO: Enable again when stable enough.