cmake build: Fix handling of test dependencies

Test dependencies are not "real" code dependencies, they just
declare that for testing the plugin the other plugin has to
be loaded, even though it is _not_ a code dependency.

Add PLUGIN_TEST_DEPENDS to add_qtc_plugin. We cannot assume
that the target exists at that point, so adapt the usual pattern.

Fixes: QTCREATORBUG-25024
Change-Id: I4165ff8df762309e0be0bfe9e8bedef796a3bf17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2020-12-11 12:23:49 +01:00
parent ea4a53a1aa
commit 305ca7e434
9 changed files with 24 additions and 31 deletions

View File

@@ -1,11 +1,8 @@
if (WITH_TESTS)
set(TST_COMPONENT CppEditor QmakeProjectManager)
endif()
add_qtc_plugin(ClangCodeModel
CONDITION TARGET libclang
DEPENDS ClangSupport CPlusPlus
PLUGIN_DEPENDS Core CppTools TextEditor ${TST_COMPONENT}
PLUGIN_DEPENDS Core CppTools TextEditor
PLUGIN_TEST_DEPENDS CppEditor QmakeProjectManager
SOURCES
clangactivationsequencecontextprocessor.cpp clangactivationsequencecontextprocessor.h
clangactivationsequenceprocessor.cpp clangactivationsequenceprocessor.h