aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2019-05-07 07:05:47 +0000
committerSam McCall <sam.mccall@gmail.com>2019-05-07 07:05:47 +0000
commitb1a1a8a4d5e46fafab045ced7ae040faebb79769 (patch)
tree9fbcb1c84d37ae579704f10f20a2eda6d89095fd
parent52fb9b0e85b2e04afe9e67eb853d8293e15f0701 (diff)
[clangd] add CLANG_ENABLE_CLANGD option to build clangd. Require threads.
Reviewers: gribozavr Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61518 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@360115 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d32b4b9f..dbb89e62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+include(CMakeDependentOption)
+
add_subdirectory(clang-apply-replacements)
add_subdirectory(clang-reorder-fields)
add_subdirectory(modularize)
@@ -9,7 +11,6 @@ add_subdirectory(clang-doc)
add_subdirectory(clang-include-fixer)
add_subdirectory(clang-move)
add_subdirectory(clang-query)
-add_subdirectory(clangd)
add_subdirectory(pp-trace)
add_subdirectory(tool-template)
@@ -25,3 +26,9 @@ if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
add_subdirectory(docs)
endif()
+# clangd has its own CMake tree. It requires threads.
+CMAKE_DEPENDENT_OPTION(CLANG_ENABLE_CLANGD "Build clangd language server" ON
+ "LLVM_ENABLE_THREADS" OFF)
+if (CLANG_ENABLE_CLANGD)
+ add_subdirectory(clangd)
+endif()