Qt: Fix Qt 6.3 Visual Studio build

Since Qt 6.3 the /permissive- option is required as otherwise the
compilation fails on static assert:
  "On MSVC you must pass the /permissive- option to the compiler."
This commit is contained in:
Tomasz Moń 2022-07-10 12:25:57 +02:00 committed by Roland Knall
parent 298a46446a
commit 75196b5103
1 changed files with 4 additions and 0 deletions

View File

@ -1436,6 +1436,10 @@ if (QT_FOUND)
endif()
endif()
# Qt requires MSVC /permissive- option since 6.3 release
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND Qt${qtver}Widgets_VERSION VERSION_GREATER_EQUAL "6.3.0")
add_compile_options("/permissive-")
endif()
endif()
if(ENABLE_CHECKHF_CONFLICT)