================
@@ -30,6 +30,36 @@ foreach(dep FileCheck count not llvm-config)
endif()
endforeach()
+if (NOT WIN32 OR NOT LLVM_LINK_LLVM_DYLIB)
+ llvm_add_library(
+ ClangdFeatureModuleExample
+ MODULE FeatureModuleExample.cpp
+ PLUGIN_TOOL clangd
+ PARTIAL_SOURCES_INTENDED)
+ llvm_add_library(
+ ClangdStandaloneTweakExample
+ MODULE StandaloneTweakExample.cpp
+ PLUGIN_TOOL clangd
+ PARTIAL_SOURCES_INTENDED)
+endif()
+
+foreach(target ClangdFeatureModuleExample ClangdStandaloneTweakExample)
+ if(TARGET ${target})
+ list(APPEND CLANGD_TEST_DEPS ${target})
+ target_include_directories(${target} PUBLIC BEFORE
+ "${CLANG_TOOLS_SOURCE_DIR}/clangd"
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ )
+ if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+ set(LLVM_LINK_COMPONENTS
+ Support
+ )
+ endif()
+ endif()
+endforeach()
+
+llvm_canonicalize_cmake_booleans(CLANG_PLUGIN_SUPPORT)
----------------
ArcsinX wrote:
I was just following the implementation style used for similar functionality in
`clang-tidy`. I think it's better to stick with `CLANG_PLUGIN_SUPPORT` for the
consistency. That said, I'm open to considering `CLANGD_PLUGIN_SUPPORT`, but
we'd need to determine the default value.
https://github.com/llvm/llvm-project/pull/226995
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits