forked from qt-creator/qt-creator
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:
@@ -1,5 +1,5 @@
|
||||
add_qtc_plugin(ClangFormat
|
||||
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0
|
||||
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND QTC_CLANG_BUILDMODE_MATCH
|
||||
DEPENDS Utils Qt5::Widgets clangFormat
|
||||
INCLUDES "${CLANG_INCLUDE_DIRS}"
|
||||
PLUGIN_DEPENDS Core TextEditor CppEditor CppTools ProjectExplorer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
add_qtc_plugin(ClangPchManager
|
||||
BUILD_DEFAULT OFF
|
||||
CONDITION TARGET libclang
|
||||
CONDITION TARGET libclang AND QTC_CLANG_BUILDMODE_MATCH
|
||||
DEPENDS ClangSupport CPlusPlus
|
||||
DEFINES CLANGPCHMANAGER_LIB
|
||||
PLUGIN_DEPENDS Core CppTools
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user