summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2019-07-03 22:45:55 +0000
committerTom Stellard <tstellar@redhat.com>2019-07-03 22:45:55 +0000
commit26c91b65f934ea549fc71c599bc7d32aee3e0b33 (patch)
tree8f0894991347de0e1e784c68b8868b6d537d231c /examples
parent711c0bdbd656146f1727cbc39c8278adcf6a5a98 (diff)
downloadclang-26c91b65f934ea549fc71c599bc7d32aee3e0b33.tar.gz
cmake: Add CLANG_LINK_CLANG_DYLIB option
Summary: Setting CLANG_LINK_CLANG_DYLIB=ON causes clang tools to link against libclang_shared.so instead of the individual component libraries. Reviewers: mgorny, beanz, smeenai, phosek, sylvestre.ledru Subscribers: arphaman, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/AnnotateFunctions/CMakeLists.txt6
-rw-r--r--examples/PrintFunctionNames/CMakeLists.txt6
-rw-r--r--examples/clang-interpreter/CMakeLists.txt2
3 files changed, 9 insertions, 5 deletions
diff --git a/examples/AnnotateFunctions/CMakeLists.txt b/examples/AnnotateFunctions/CMakeLists.txt
index 44b6317e72..e9850b64f0 100644
--- a/examples/AnnotateFunctions/CMakeLists.txt
+++ b/examples/AnnotateFunctions/CMakeLists.txt
@@ -1,11 +1,13 @@
add_llvm_library(AnnotateFunctions MODULE AnnotateFunctions.cpp PLUGIN_TOOL clang)
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
- target_link_libraries(AnnotateFunctions PRIVATE
+ set(LLVM_LINK_COMPONENTS
+ Support
+ )
+ clang_target_link_libraries(AnnotateFunctions PRIVATE
clangAST
clangBasic
clangFrontend
clangLex
- LLVMSupport
)
endif()
diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt
index 68c6f76dff..63b0c01573 100644
--- a/examples/PrintFunctionNames/CMakeLists.txt
+++ b/examples/PrintFunctionNames/CMakeLists.txt
@@ -12,10 +12,12 @@ endif()
add_llvm_library(PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang)
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
- target_link_libraries(PrintFunctionNames PRIVATE
+ set(LLVM_LINK_COMPONENTS
+ Support
+ )
+ clang_target_link_libraries(PrintFunctionNames PRIVATE
clangAST
clangBasic
clangFrontend
- LLVMSupport
)
endif()
diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt
index ae2c0876c8..11056aa379 100644
--- a/examples/clang-interpreter/CMakeLists.txt
+++ b/examples/clang-interpreter/CMakeLists.txt
@@ -19,7 +19,7 @@ add_dependencies(clang-interpreter
clang-resource-headers
)
-target_link_libraries(clang-interpreter
+clang_target_link_libraries(clang-interpreter
PRIVATE
clangBasic
clangCodeGen