cmake: don't pass ftemplate-depth with clang-cl

clang-cl does not support -ftemplate-depth. so we should not pass it
when MSVC is defined.

Pick-to: 6.8
Change-Id: I7f411187c476fa275b677f96a19f782262dc4545
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 39015c049b3f39a27737236b6740f7f5038ab75b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tim Blechmann 2025-03-07 11:42:24 +08:00 committed by Qt Cherry-pick Bot
parent 935d1d633c
commit b7ec18cfdb

View File

@ -493,7 +493,7 @@ qt_internal_extend_target(Core
SOURCES ${core_version_tagging_files}
)
if(GCC OR CLANG)
if((GCC OR CLANG) AND NOT MSVC)
# qglobal.cpp has #include moc_qnamespace.cpp, so increase the template
# depth for it due to the size of the Qt namespace
set_source_files_properties(global/qglobal.cpp PROPERTIES