diff options
author | Yuhang Zhao <2546789017@qq.com> | 2020-11-02 12:36:14 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2020-11-02 20:06:22 +0800 |
commit | 4b694032dfe61dd9190170d15ee2edddbc9dfd7c (patch) | |
tree | 9e5d0917fd7e56d1324e0037bed13771230c73a5 /cmake/QtInternalTargets.cmake | |
parent | 2b4a581f34854d9c0bb8d53626d929abd0661bd8 (diff) |
Improve clang-cl support for Qt6
1. clang-cl doesn't support "-fno-exceptions", it uses msvc's parameter.
2. some parameters supported by msvc are not supported by clang-cl
and they are causing huge warning message flood, don't add them.
3. use correct optimize parameter for clang-cl.
Change-Id: Idbadf139127143c5fa6c49068588cb26f47da7a2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtInternalTargets.cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 91a75983ea..cdaa91ffcb 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -178,15 +178,19 @@ 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) + if (MSVC_VERSION GREATER_EQUAL 1909 AND NOT CLANG) target_compile_options(PlatformCommonInternal INTERFACE -Zc:referenceBinding ) endif() - if (MSVC_VERSION GREATER_EQUAL 1919) + if (MSVC_VERSION GREATER_EQUAL 1919 AND NOT CLANG) target_compile_options(PlatformCommonInternal INTERFACE -Zc:externConstexpr ) |