diff --git a/completion/CMakeLists.txt b/completion/CMakeLists.txt index 0be7479..840daa1 100644 --- a/completion/CMakeLists.txt +++ b/completion/CMakeLists.txt @@ -1,32 +1,34 @@ -add_subdirectory(tests) +if (BUILD_TESTING) + add_subdirectory(tests) +endif() set(completion_SRCS worker.cpp item.cpp implementationitem.cpp includefileitem.cpp keyworditem.cpp context.cpp model.cpp helpers.cpp codemodelitem.cpp ) ecm_qt_declare_logging_category(completion_SRCS HEADER completiondebug.h IDENTIFIER COMPLETION CATEGORY_NAME "kdevelop.languages.php.completion" ) add_library( kdevphpcompletion SHARED ${completion_SRCS} ) generate_export_header( kdevphpcompletion EXPORT_MACRO_NAME KDEVPHPCOMPLETION_EXPORT EXPORT_FILE_NAME phpcompletionexport.h) target_link_libraries(kdevphpcompletion LINK_PRIVATE KDev::Language KDev::Interfaces KDev::Project kdevphpduchain kdevphpparser ) install(TARGETS kdevphpcompletion DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/duchain/CMakeLists.txt b/duchain/CMakeLists.txt index fe0a2ba..3cc5ff5 100644 --- a/duchain/CMakeLists.txt +++ b/duchain/CMakeLists.txt @@ -1,54 +1,56 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_subdirectory(tests) +if (BUILD_TESTING) + add_subdirectory(tests) +endif() set(duchain_SRCS types/indexedcontainer.cpp types/integraltypeextended.cpp types/structuretype.cpp builders/predeclarationbuilder.cpp builders/declarationbuilder.cpp builders/contextbuilder.cpp builders/usebuilder.cpp builders/typebuilder.cpp editorintegrator.cpp dumptypes.cpp expressionvisitor.cpp expressionparser.cpp expressionevaluationresult.cpp helper.cpp phpducontext.cpp declarations/variabledeclaration.cpp declarations/classmethoddeclaration.cpp declarations/classdeclaration.cpp declarations/functiondeclaration.cpp declarations/namespacedeclaration.cpp declarations/namespacealiasdeclaration.cpp declarations/traitmethodaliasdeclaration.cpp declarations/traitmemberaliasdeclaration.cpp navigation/navigationwidget.cpp navigation/declarationnavigationcontext.cpp navigation/includenavigationcontext.cpp navigation/magicconstantnavigationcontext.cpp completioncodemodel.cpp ) ecm_qt_declare_logging_category(duchain_SRCS HEADER duchaindebug.h IDENTIFIER DUCHAIN CATEGORY_NAME "kdevelop.languages.php.duchain" ) add_library( kdevphpduchain SHARED ${duchain_SRCS} ) generate_export_header(kdevphpduchain EXPORT_MACRO_NAME KDEVPHPDUCHAIN_EXPORT EXPORT_FILE_NAME phpduchainexport.h) target_link_libraries(kdevphpduchain LINK_PRIVATE KDev::Interfaces KDev::Language KDev::Shell KDev::Project kdevphpparser ) install(TARGETS kdevphpduchain DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index 25bc491..55260a8 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -1,41 +1,43 @@ -add_subdirectory(test) +if (BUILD_TESTING) + add_subdirectory(test) +endif() set(parser_STAT_SRCS phplexer.cpp parsesession.cpp ) kdevpgqt_generate(parser_SRCS php NAMESPACE Php DEBUG_VISITOR TOKEN_TEXT "${php_SOURCE_DIR}/parser/php.g" "${php_SOURCE_DIR}/parser/phplexer.h" ) ecm_qt_declare_logging_category(parser_SRCS HEADER parserdebug.h IDENTIFIER PARSER CATEGORY_NAME "kdevelop.languages.php.parser" ) add_library(kdevphpparser SHARED ${parser_SRCS} ${parser_STAT_SRCS}) generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT EXPORT_FILE_NAME parserexport.h) target_link_libraries(kdevphpparser LINK_PRIVATE KDev::Language KF5::I18n ) add_executable(php-parser main.cpp) # hack to make phpdebugvisitor.h (generated at compile time) # use the correct EXPORT tags when compiling in MinGW if (MINGW) add_definitions(-DMAKE_KDEV4PHPPARSER_LIB) endif (MINGW) target_link_libraries(php-parser KDev::Tests KDev::Language kdevphpparser ) install(TARGETS kdevphpparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})