Add externConstexpr to MSVC compile options

We want this in order to be able to export constexpr members.

Change-Id: I33ba7964ebee54fe656df983985d8d6fa0b99358
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Ulf Hermann 2020-10-12 15:13:05 +02:00
parent 182760e84d
commit 4e10abb4c1
2 changed files with 6 additions and 0 deletions

View File

@ -186,6 +186,11 @@ if (MSVC)
-Zc:referenceBinding
)
endif()
if (MSVC_VERSION GREATER_EQUAL 1919)
target_compile_options(PlatformCommonInternal INTERFACE
-Zc:externConstexpr
)
endif()
target_compile_options(PlatformCommonInternal INTERFACE -Zc:wchar_t)

View File

@ -119,6 +119,7 @@ greaterThan(QMAKE_MSC_VER, 1919) {
MSVC_VER = 16.0
QMAKE_CXXFLAGS_CXX2A = -std:c++latest
QMAKE_CXXFLAGS += -Zc:externConstexpr
}
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC