summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtInternalTargets.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 2d3b6769cc..5f92252fe4 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -110,3 +110,27 @@ if(APPLE_UIKIT)
target_compile_definitions(PlatformCommonInternal INTERFACE QT_COMPILER_SUPPORTS_SSE2)
endif()
endif()
+
+# Taken from mkspecs/common/msvc-version.conf and mkspecs/common/msvc-desktop.conf
+if (MSVC)
+ if (MSVC_VERSION GREATER_EQUAL 1799)
+ target_compile_options(PlatformCommonInternal INTERFACE
+ -FS
+ -Zc:rvalueCast
+ -Zc:inline
+ )
+ endif()
+ if (MSVC_VERSION GREATER_EQUAL 1899)
+ target_compile_options(PlatformCommonInternal INTERFACE
+ -Zc:strictStrings
+ -Zc:throwingNew
+ )
+ endif()
+ if (MSVC_VERSION GREATER_EQUAL 1909)
+ target_compile_options(PlatformCommonInternal INTERFACE
+ -Zc:referenceBinding
+ )
+ endif()
+
+ target_compile_options(PlatformCommonInternal INTERFACE -Zc:wchar_t -utf-8)
+endif()