CMake build: Disable FakeVim and building with PCH with Qt 6

FakeVim does not compile on MSVC because Qt 6 doesn't like
meta types that are recursive maps with keys that have a custom
operator==.
Building with PCH has different issues on macOS and MSVC.

Change-Id: Id1b9580f7347f1c8facade67fd74532a023af41f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2021-03-10 10:24:55 +01:00
parent 99dd3a0260
commit a3b537ad39
2 changed files with 6 additions and 1 deletions

View File

@@ -25,7 +25,6 @@ set(CMAKE_CXX_EXTENSIONS OFF)
option(WITH_TESTS "Build Tests" OFF) option(WITH_TESTS "Build Tests" OFF)
add_feature_info("Build tests" ${WITH_TESTS} "") add_feature_info("Build tests" ${WITH_TESTS} "")
option(WITH_DEBUG_CMAKE "Enabled CMake project debugging functionality (e.g. source file disk checking)" OFF) option(WITH_DEBUG_CMAKE "Enabled CMake project debugging functionality (e.g. source file disk checking)" OFF)
option(BUILD_WITH_PCH "Build with precompiled headers" ON)
# merge binary directories of sub projects into top level # merge binary directories of sub projects into top level
set(QTC_MERGE_BINARY_DIR ON) set(QTC_MERGE_BINARY_DIR ON)
@@ -50,10 +49,15 @@ find_package(Qt5
) )
if (Qt5_VERSION VERSION_LESS 6.0.0) if (Qt5_VERSION VERSION_LESS 6.0.0)
install(TARGETS Qt6Core5Compat EXPORT QtCreator) install(TARGETS Qt6Core5Compat EXPORT QtCreator)
set(BUILD_WITH_PCH_DEFAULT ON)
else()
set(BUILD_WITH_PCH_DEFAULT OFF)
endif() endif()
find_package(Qt5 COMPONENTS LinguistTools QUIET) find_package(Qt5 COMPONENTS LinguistTools QUIET)
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET) find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET)
option(BUILD_WITH_PCH "Build with precompiled headers" ${BUILD_WITH_PCH_DEFAULT})
find_package(Threads) find_package(Threads)
find_package(Clang QUIET) find_package(Clang QUIET)
find_package(KF5SyntaxHighlighting QUIET) find_package(KF5SyntaxHighlighting QUIET)

View File

@@ -1,4 +1,5 @@
add_qtc_plugin(FakeVim add_qtc_plugin(FakeVim
CONDITION Qt5_VERSION VERSION_LESS 6.0.0
PLUGIN_DEPENDS Core TextEditor PLUGIN_DEPENDS Core TextEditor
PLUGIN_TEST_DEPENDS CppEditor CppTools PLUGIN_TEST_DEPENDS CppEditor CppTools
SOURCES ${TEST_SOURCES} SOURCES ${TEST_SOURCES}