r365092 - cmake: Add CLANG_LINK_CLANG_DYLIB option
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 3 15:45:55 PDT 2019
Author: tstellar
Date: Wed Jul 3 15:45:55 2019
New Revision: 365092
URL: http://llvm.org/viewvc/llvm-project?rev=365092&view=rev
Log:
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
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/cmake/modules/AddClang.cmake
cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt
cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
cfe/trunk/examples/clang-interpreter/CMakeLists.txt
cfe/trunk/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt
cfe/trunk/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt
cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt
cfe/trunk/tools/arcmt-test/CMakeLists.txt
cfe/trunk/tools/clang-check/CMakeLists.txt
cfe/trunk/tools/clang-diff/CMakeLists.txt
cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt
cfe/trunk/tools/clang-format/CMakeLists.txt
cfe/trunk/tools/clang-import-test/CMakeLists.txt
cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt
cfe/trunk/tools/clang-refactor/CMakeLists.txt
cfe/trunk/tools/clang-rename/CMakeLists.txt
cfe/trunk/tools/clang-scan-deps/CMakeLists.txt
cfe/trunk/tools/diagtool/CMakeLists.txt
cfe/trunk/tools/driver/CMakeLists.txt
cfe/trunk/unittests/AST/CMakeLists.txt
cfe/trunk/unittests/ASTMatchers/CMakeLists.txt
cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt
cfe/trunk/unittests/Analysis/CMakeLists.txt
cfe/trunk/unittests/Basic/CMakeLists.txt
cfe/trunk/unittests/CodeGen/CMakeLists.txt
cfe/trunk/unittests/CrossTU/CMakeLists.txt
cfe/trunk/unittests/Driver/CMakeLists.txt
cfe/trunk/unittests/Format/CMakeLists.txt
cfe/trunk/unittests/Frontend/CMakeLists.txt
cfe/trunk/unittests/Index/CMakeLists.txt
cfe/trunk/unittests/Lex/CMakeLists.txt
cfe/trunk/unittests/Rename/CMakeLists.txt
cfe/trunk/unittests/Rewrite/CMakeLists.txt
cfe/trunk/unittests/Sema/CMakeLists.txt
cfe/trunk/unittests/Serialization/CMakeLists.txt
cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
cfe/trunk/unittests/Tooling/CMakeLists.txt
cfe/trunk/unittests/Tooling/Syntax/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -323,6 +323,14 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CA
set(CLANG_PYTHON_BINDINGS_VERSIONS "" CACHE STRING
"Python versions to install libclang python bindings for")
+set(CLANG_LINK_CLANG_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL
+ "Link tools against libclang_shared.so")
+
+if (NOT LLVM_LINK_LLVM_DYLIB AND CLANG_LINK_CLANG_DYLIB)
+ message(FATAL_ERROR "Cannot set CLANG_LINK_CLANG_DYLIB=ON when "
+ "LLVM_LINK_LLVM_DYLIB=OFF")
+endif()
+
# The libdir suffix must exactly match whatever LLVM's configuration used.
set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}")
Modified: cfe/trunk/cmake/modules/AddClang.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/modules/AddClang.cmake?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/cmake/modules/AddClang.cmake (original)
+++ cfe/trunk/cmake/modules/AddClang.cmake Wed Jul 3 15:45:55 2019
@@ -172,3 +172,12 @@ macro(add_clang_symlink name dest)
# Always generate install targets
llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
endmacro()
+
+function(clang_target_link_libraries target type)
+ if (CLANG_LINK_CLANG_DYLIB)
+ target_link_libraries(${target} ${type} clang_shared)
+ else()
+ target_link_libraries(${target} ${type} ${ARGN})
+ endif()
+
+endfunction()
Modified: cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt (original)
+++ cfe/trunk/examples/AnnotateFunctions/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -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()
Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -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()
Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/CMakeLists.txt (original)
+++ cfe/trunk/examples/clang-interpreter/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -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
Modified: cfe/trunk/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -1,10 +1,13 @@
+set(LLVM_LINK_COMPONENTS
+ Support
+ )
+
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerDependencyHandlingAnalyzerPlugin.exports)
add_llvm_library(CheckerDependencyHandlingAnalyzerPlugin MODULE CheckerDependencyHandling.cpp PLUGIN_TOOL clang)
-target_link_libraries(CheckerDependencyHandlingAnalyzerPlugin PRIVATE
+clang_target_link_libraries(CheckerDependencyHandlingAnalyzerPlugin PRIVATE
clangAnalysis
clangAST
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
- LLVMSupport
)
Modified: cfe/trunk/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -1,10 +1,13 @@
+set(LLVM_LINK_COMPONENTS
+ Support
+ )
+
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerOptionHandlingAnalyzerPlugin.exports)
add_llvm_library(CheckerOptionHandlingAnalyzerPlugin MODULE CheckerOptionHandling.cpp PLUGIN_TOOL clang)
-target_link_libraries(CheckerOptionHandlingAnalyzerPlugin PRIVATE
+clang_target_link_libraries(CheckerOptionHandlingAnalyzerPlugin PRIVATE
clangAnalysis
clangAST
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
- LLVMSupport
)
Modified: cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -1,10 +1,13 @@
+set(LLVM_LINK_COMPONENTS
+ Support
+ )
+
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports)
add_llvm_library(SampleAnalyzerPlugin MODULE MainCallChecker.cpp PLUGIN_TOOL clang)
-target_link_libraries(SampleAnalyzerPlugin PRIVATE
+clang_target_link_libraries(SampleAnalyzerPlugin PRIVATE
clangAnalysis
clangAST
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
- LLVMSupport
)
Modified: cfe/trunk/tools/arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/arcmt-test/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/arcmt-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/arcmt-test/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -6,7 +6,7 @@ add_clang_executable(arcmt-test
arcmt-test.cpp
)
-target_link_libraries(arcmt-test
+clang_target_link_libraries(arcmt-test
PRIVATE
clangARCMigrate
clangBasic
Modified: cfe/trunk/tools/clang-check/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-check/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -8,7 +8,7 @@ add_clang_executable(clang-check
ClangCheck.cpp
)
-target_link_libraries(clang-check
+clang_target_link_libraries(clang-check
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/tools/clang-diff/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-diff/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-diff/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-diff/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -6,7 +6,7 @@ add_clang_executable(clang-diff
ClangDiff.cpp
)
-target_link_libraries(clang-diff
+clang_target_link_libraries(clang-diff
PRIVATE
clangBasic
clangFrontend
Modified: cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -7,7 +7,7 @@ add_clang_executable(clang-extdef-mappin
ClangExtDefMapGen.cpp
)
-target_link_libraries(clang-extdef-mapping
+clang_target_link_libraries(clang-extdef-mapping
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/tools/clang-format/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-format/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -11,7 +11,7 @@ set(CLANG_FORMAT_LIB_DEPS
clangToolingCore
)
-target_link_libraries(clang-format
+clang_target_link_libraries(clang-format
PRIVATE
${CLANG_FORMAT_LIB_DEPS}
)
Modified: cfe/trunk/tools/clang-import-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-import-test/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-import-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-import-test/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -24,7 +24,7 @@ set(CLANG_IMPORT_TEST_LIB_DEPS
clangSerialization
)
-target_link_libraries(clang-import-test
+clang_target_link_libraries(clang-import-test
PRIVATE
${CLANG_IMPORT_TEST_LIB_DEPS}
)
Modified: cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -17,7 +17,7 @@ set(CLANG_OFFLOAD_BUNDLER_LIB_DEPS
add_dependencies(clang clang-offload-bundler)
-target_link_libraries(clang-offload-bundler
+clang_target_link_libraries(clang-offload-bundler
PRIVATE
${CLANG_OFFLOAD_BUNDLER_LIB_DEPS}
)
Modified: cfe/trunk/tools/clang-refactor/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-refactor/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -8,7 +8,7 @@ add_clang_tool(clang-refactor
TestSupport.cpp
)
-target_link_libraries(clang-refactor
+clang_target_link_libraries(clang-refactor
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/tools/clang-rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-rename/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-rename/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-rename/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -7,7 +7,7 @@ add_clang_tool(clang-rename
ClangRename.cpp
)
-target_link_libraries(clang-rename
+clang_target_link_libraries(clang-rename
PRIVATE
clangBasic
clangFrontend
Modified: cfe/trunk/tools/clang-scan-deps/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-scan-deps/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/clang-scan-deps/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-scan-deps/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -21,7 +21,7 @@ set(CLANG_SCAN_DEPS_LIB_DEPS
clangDependencyScanning
)
-target_link_libraries(clang-scan-deps
+clang_target_link_libraries(clang-scan-deps
PRIVATE
${CLANG_SCAN_DEPS_LIB_DEPS}
)
Modified: cfe/trunk/tools/diagtool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/diagtool/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/diagtool/CMakeLists.txt (original)
+++ cfe/trunk/tools/diagtool/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -12,7 +12,7 @@ add_clang_executable(diagtool
TreeView.cpp
)
-target_link_libraries(diagtool
+clang_target_link_libraries(diagtool
PRIVATE
clangBasic
clangFrontend
Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -39,7 +39,7 @@ add_clang_tool(clang
${tablegen_deps}
)
-target_link_libraries(clang
+clang_target_link_libraries(clang
PRIVATE
clangBasic
clangCodeGen
Modified: cfe/trunk/unittests/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CMakeLists.txt (original)
+++ cfe/trunk/unittests/AST/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -31,7 +31,7 @@ add_clang_unittest(ASTTests
StructuralEquivalenceTest.cpp
)
-target_link_libraries(ASTTests
+clang_target_link_libraries(ASTTests
PRIVATE
clangAST
clangASTMatchers
Modified: cfe/trunk/unittests/ASTMatchers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -18,7 +18,7 @@ add_clang_unittest(ASTMatchersTests
ASTMatchersTraversalTest.cpp
)
-target_link_libraries(ASTMatchersTests
+clang_target_link_libraries(ASTMatchersTests
PRIVATE
clangAST
clangASTMatchers
Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -8,7 +8,7 @@ add_clang_unittest(DynamicASTMatchersTes
RegistryTest.cpp
)
-target_link_libraries(DynamicASTMatchersTests
+clang_target_link_libraries(DynamicASTMatchersTests
PRIVATE
clangAST
clangASTMatchers
Modified: cfe/trunk/unittests/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Analysis/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Analysis/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -8,7 +8,7 @@ add_clang_unittest(ClangAnalysisTests
ExprMutationAnalyzerTest.cpp
)
-target_link_libraries(ClangAnalysisTests
+clang_target_link_libraries(ClangAnalysisTests
PRIVATE
clangAnalysis
clangAST
Modified: cfe/trunk/unittests/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Basic/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -10,7 +10,7 @@ add_clang_unittest(BasicTests
SourceManagerTest.cpp
)
-target_link_libraries(BasicTests
+clang_target_link_libraries(BasicTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CodeGen/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CodeGen/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -10,7 +10,7 @@ add_clang_unittest(ClangCodeGenTests
TBAAMetadataTest.cpp
)
-target_link_libraries(ClangCodeGenTests
+clang_target_link_libraries(ClangCodeGenTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/CrossTU/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CrossTU/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/CrossTU/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CrossTU/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -7,7 +7,7 @@ add_clang_unittest(CrossTUTests
CrossTranslationUnitTest.cpp
)
-target_link_libraries(CrossTUTests
+clang_target_link_libraries(CrossTUTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Driver/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Driver/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Driver/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -11,7 +11,7 @@ add_clang_unittest(ClangDriverTests
MultilibTest.cpp
)
-target_link_libraries(ClangDriverTests
+clang_target_link_libraries(ClangDriverTests
PRIVATE
clangDriver
clangBasic
Modified: cfe/trunk/unittests/Format/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Format/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -22,7 +22,7 @@ add_clang_unittest(FormatTests
UsingDeclarationsSorterTest.cpp
)
-target_link_libraries(FormatTests
+clang_target_link_libraries(FormatTests
PRIVATE
clangBasic
clangFormat
Modified: cfe/trunk/unittests/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Frontend/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -12,7 +12,7 @@ add_clang_unittest(FrontendTests
PCHPreambleTest.cpp
OutputStreamTest.cpp
)
-target_link_libraries(FrontendTests
+clang_target_link_libraries(FrontendTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/Index/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Index/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Index/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Index/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -7,7 +7,7 @@ add_clang_unittest(IndexTests
IndexTests.cpp
)
-target_link_libraries(IndexTests
+clang_target_link_libraries(IndexTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Lex/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -11,7 +11,7 @@ add_clang_unittest(LexTests
PPConditionalDirectiveRecordTest.cpp
)
-target_link_libraries(LexTests
+clang_target_link_libraries(LexTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/Rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Rename/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Rename/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Rename/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -13,7 +13,7 @@ add_clang_unittest(ClangRenameTests
RenameFunctionTest.cpp
)
-target_link_libraries(ClangRenameTests
+clang_target_link_libraries(ClangRenameTests
PRIVATE
clangAST
clangASTMatchers
Modified: cfe/trunk/unittests/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Rewrite/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Rewrite/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Rewrite/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS
add_clang_unittest(RewriteTests
RewriteBufferTest.cpp
)
-target_link_libraries(RewriteTests
+clang_target_link_libraries(RewriteTests
PRIVATE
clangRewrite
)
Modified: cfe/trunk/unittests/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Sema/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -7,7 +7,7 @@ add_clang_unittest(SemaTests
CodeCompleteTest.cpp
)
-target_link_libraries(SemaTests
+clang_target_link_libraries(SemaTests
PRIVATE
clangAST
clangBasic
@@ -16,5 +16,9 @@ target_link_libraries(SemaTests
clangSema
clangSerialization
clangTooling
- LLVMTestingSupport
)
+
+target_link_libraries(SemaTests
+ PRIVATE
+ LLVMTestingSupport
+)
Modified: cfe/trunk/unittests/Serialization/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Serialization/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Serialization/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Serialization/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -8,7 +8,7 @@ add_clang_unittest(SerializationTests
InMemoryModuleCacheTest.cpp
)
-target_link_libraries(SerializationTests
+clang_target_link_libraries(SerializationTests
PRIVATE
clangAST
clangBasic
Modified: cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt (original)
+++ cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -10,7 +10,7 @@ add_clang_unittest(StaticAnalysisTests
SymbolReaperTest.cpp
)
-target_link_libraries(StaticAnalysisTests
+clang_target_link_libraries(StaticAnalysisTests
PRIVATE
clangBasic
clangAnalysis
Modified: cfe/trunk/unittests/Tooling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Tooling/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -57,7 +57,7 @@ add_clang_unittest(ToolingTests
TransformerTest.cpp
)
-target_link_libraries(ToolingTests
+clang_target_link_libraries(ToolingTests
PRIVATE
clangAST
clangASTMatchers
@@ -71,8 +71,11 @@ target_link_libraries(ToolingTests
clangToolingCore
clangToolingInclusions
clangToolingRefactoring
- LLVMTestingSupport
)
+target_link_libraries(ToolingTests
+ PRIVATE
+ LLVMTestingSupport
+)
add_subdirectory(Syntax)
Modified: cfe/trunk/unittests/Tooling/Syntax/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/Syntax/CMakeLists.txt?rev=365092&r1=365091&r2=365092&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/Syntax/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Tooling/Syntax/CMakeLists.txt Wed Jul 3 15:45:55 2019
@@ -6,7 +6,7 @@ add_clang_unittest(SyntaxTests
TokensTest.cpp
)
-target_link_libraries(SyntaxTests
+clang_target_link_libraries(SyntaxTests
PRIVATE
clangAST
clangBasic
@@ -15,5 +15,9 @@ target_link_libraries(SyntaxTests
clangSerialization
clangTooling
clangToolingSyntax
- LLVMTestingSupport
)
+
+target_link_libraries(SyntaxTests
+ PRIVATE
+ LLVMTestingSupport
+)
More information about the cfe-commits
mailing list