forked from qt-creator/qt-creator
CMake build: Add ability to disable building of individual plugins
Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.
Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.
Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -112,8 +112,9 @@ add_qtc_plugin(CppTools
|
||||
wrappablelineedit.cpp wrappablelineedit.h
|
||||
)
|
||||
|
||||
if (WITH_TESTS)
|
||||
target_sources(CppTools PRIVATE
|
||||
extend_qtc_plugin(CppTools
|
||||
CONDITION WITH_TESTS
|
||||
SOURCES
|
||||
cppcodegen_test.cpp
|
||||
cppcompletion_test.cpp
|
||||
cppheadersource_test.cpp
|
||||
@@ -127,5 +128,4 @@ if (WITH_TESTS)
|
||||
modelmanagertesthelper.cpp modelmanagertesthelper.h
|
||||
symbolsearcher_test.cpp
|
||||
typehierarchybuilder_test.cpp
|
||||
)
|
||||
endif()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user