cmake: Fix building debug with release libclang

Parts of QC cannot be linked against a release build of clangTooling
libs and vice versa when building on Windows.
Check whether the provided libs match the current build mode and
disable respective parts if necessary.
Re-use this information to decide whether unittest should be build
or not.

Change-Id: Ibc2aab0d7886e78ebbf8f15a43152efad49f1eff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2020-11-18 09:08:55 +01:00
parent 05a1b2a6e8
commit 6b62a99a8a
5 changed files with 20 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
add_qtc_plugin(ClangRefactoring
BUILD_DEFAULT OFF
CONDITION TARGET libclang
CONDITION TARGET libclang AND QTC_CLANG_BUILDMODE_MATCH
DEPENDS ClangSupport CPlusPlus
PLUGIN_DEPENDS Core CppTools TextEditor ClangPchManager
SOURCES ${TEST_SOURCES}