r319840 - [CMake] Use PRIVATE in target_link_libraries for executables
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 13:49:56 PST 2017
Author: smeenai
Date: Tue Dec 5 13:49:56 2017
New Revision: 319840
URL: http://llvm.org/viewvc/llvm-project?rev=319840&view=rev
Log:
[CMake] Use PRIVATE in target_link_libraries for executables
We currently use target_link_libraries without an explicit scope
specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables.
Dependencies added in this way apply to both the target and its
dependencies, i.e. they become part of the executable's link interface
and are transitive.
Transitive dependencies generally don't make sense for executables,
since you wouldn't normally be linking against an executable. This also
causes issues for generating install export files when using
LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM
library dependencies, which are currently added as interface
dependencies. If clang is in the distribution components but the LLVM
libraries it depends on aren't (which is a perfectly legitimate use case
if the LLVM libraries are being built static and there are therefore no
run-time dependencies on them), CMake will complain about the LLVM
libraries not being in export set when attempting to generate the
install export file for clang. This is reasonable behavior on CMake's
part, and the right thing is for LLVM's build system to explicitly use
PRIVATE dependencies for executables.
Unfortunately, CMake doesn't allow you to mix and match the keyword and
non-keyword target_link_libraries signatures for a single target; i.e.,
if a single call to target_link_libraries for a particular target uses
one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must
also be updated to use those keywords. This means we must do this change
in a single shot. I also fully expect to have missed some instances; I
tested by enabling all the projects in the monorepo (except dragonegg),
and configuring both with and without shared libraries, on both Darwin
and Linux, but I'm planning to rely on the buildbots for other
configurations (since it should be pretty easy to fix those).
Even after this change, we still have a lot of target_link_libraries
calls that don't specify a scope keyword, mostly for shared libraries.
I'm thinking about addressing those in a follow-up, but that's a
separate change IMO.
Differential Revision: https://reviews.llvm.org/D40823
Modified:
cfe/trunk/examples/clang-interpreter/CMakeLists.txt
cfe/trunk/tools/arcmt-test/CMakeLists.txt
cfe/trunk/tools/c-arcmt-test/CMakeLists.txt
cfe/trunk/tools/c-index-test/CMakeLists.txt
cfe/trunk/tools/clang-check/CMakeLists.txt
cfe/trunk/tools/clang-diff/CMakeLists.txt
cfe/trunk/tools/clang-format/CMakeLists.txt
cfe/trunk/tools/clang-func-mapping/CMakeLists.txt
cfe/trunk/tools/clang-fuzzer/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/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/Lex/CMakeLists.txt
cfe/trunk/unittests/Rename/CMakeLists.txt
cfe/trunk/unittests/Rewrite/CMakeLists.txt
cfe/trunk/unittests/Sema/CMakeLists.txt
cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
cfe/trunk/unittests/Tooling/CMakeLists.txt
cfe/trunk/unittests/libclang/CMakeLists.txt
Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/CMakeLists.txt (original)
+++ cfe/trunk/examples/clang-interpreter/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -17,6 +17,7 @@ add_dependencies(clang-interpreter
)
target_link_libraries(clang-interpreter
+ PRIVATE
clangBasic
clangCodeGen
clangDriver
Modified: cfe/trunk/tools/arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/arcmt-test/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/arcmt-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/arcmt-test/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -7,6 +7,7 @@ add_clang_executable(arcmt-test
)
target_link_libraries(arcmt-test
+ PRIVATE
clangARCMigrate
clangBasic
clangFrontend
Modified: cfe/trunk/tools/c-arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-arcmt-test/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/c-arcmt-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/c-arcmt-test/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -4,10 +4,12 @@ add_clang_executable(c-arcmt-test
if (LLVM_BUILD_STATIC)
target_link_libraries(c-arcmt-test
+ PRIVATE
libclang_static
)
else()
target_link_libraries(c-arcmt-test
+ PRIVATE
libclang
)
endif()
Modified: cfe/trunk/tools/c-index-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/c-index-test/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -22,6 +22,7 @@ if (LLVM_BUILD_STATIC)
)
else()
target_link_libraries(c-index-test
+ PRIVATE
libclang
clangAST
clangBasic
@@ -39,7 +40,7 @@ set_target_properties(c-index-test
# If libxml2 is available, make it available for c-index-test.
if (CLANG_HAVE_LIBXML)
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
- target_link_libraries(c-index-test ${LIBXML2_LIBRARIES})
+ target_link_libraries(c-index-test PRIVATE ${LIBXML2_LIBRARIES})
endif()
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
Modified: cfe/trunk/tools/clang-check/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-check/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -9,6 +9,7 @@ add_clang_executable(clang-check
)
target_link_libraries(clang-check
+ PRIVATE
clangAST
clangBasic
clangDriver
Modified: cfe/trunk/tools/clang-diff/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-diff/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-diff/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-diff/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -7,6 +7,7 @@ add_clang_executable(clang-diff
)
target_link_libraries(clang-diff
+ PRIVATE
clangBasic
clangFrontend
clangTooling
Modified: cfe/trunk/tools/clang-format/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-format/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -12,6 +12,7 @@ set(CLANG_FORMAT_LIB_DEPS
)
target_link_libraries(clang-format
+ PRIVATE
${CLANG_FORMAT_LIB_DEPS}
)
Modified: cfe/trunk/tools/clang-func-mapping/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-func-mapping/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-func-mapping/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-func-mapping/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -10,6 +10,7 @@ add_clang_executable(clang-func-mapping
)
target_link_libraries(clang-func-mapping
+ PRIVATE
clangAST
clangBasic
clangCrossTU
Modified: cfe/trunk/tools/clang-fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-fuzzer/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-fuzzer/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-fuzzer/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -66,6 +66,7 @@ add_clang_executable(clang-fuzzer
)
target_link_libraries(clang-fuzzer
+ PRIVATE
${LLVM_LIB_FUZZING_ENGINE}
clangHandleCXX
)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-import-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-import-test/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -24,5 +24,6 @@ set(CLANG_IMPORT_TEST_LIB_DEPS
)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -18,6 +18,7 @@ set(CLANG_OFFLOAD_BUNDLER_LIB_DEPS
add_dependencies(clang clang-offload-bundler)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-refactor/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -9,6 +9,7 @@ add_clang_tool(clang-refactor
)
target_link_libraries(clang-refactor
+ PRIVATE
clangAST
clangBasic
clangFormat
Modified: cfe/trunk/tools/clang-rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-rename/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/clang-rename/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-rename/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -6,6 +6,7 @@ set(LLVM_LINK_COMPONENTS
add_clang_tool(clang-rename ClangRename.cpp)
target_link_libraries(clang-rename
+ PRIVATE
clangBasic
clangFrontend
clangRewrite
Modified: cfe/trunk/tools/diagtool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/diagtool/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/diagtool/CMakeLists.txt (original)
+++ cfe/trunk/tools/diagtool/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -13,6 +13,7 @@ add_clang_executable(diagtool
)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -38,6 +38,7 @@ add_clang_tool(clang
)
target_link_libraries(clang
+ PRIVATE
clangBasic
clangCodeGen
clangDriver
@@ -85,6 +86,7 @@ if (APPLE)
set(TOOL_INFO_PLIST_OUT "${CMAKE_CURRENT_BINARY_DIR}/${TOOL_INFO_PLIST}")
target_link_libraries(clang
+ PRIVATE
"-Wl,-sectcreate,__TEXT,__info_plist,${TOOL_INFO_PLIST_OUT}")
configure_file("${TOOL_INFO_PLIST}.in" "${TOOL_INFO_PLIST_OUT}" @ONLY)
@@ -127,5 +129,5 @@ if(CLANG_ORDER_FILE AND (LD64_EXECUTABLE
endif()
if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
- target_link_libraries(clang Polly)
+ target_link_libraries(clang PRIVATE Polly)
endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
Modified: cfe/trunk/unittests/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CMakeLists.txt (original)
+++ cfe/trunk/unittests/AST/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -21,6 +21,7 @@ add_clang_unittest(ASTTests
)
target_link_libraries(ASTTests
+ PRIVATE
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/unittests/ASTMatchers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -18,6 +18,7 @@ add_clang_unittest(ASTMatchersTests
ASTMatchersTraversalTest.cpp)
target_link_libraries(ASTMatchersTests
+ PRIVATE
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/ASTMatchers/Dynamic/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -8,6 +8,7 @@ add_clang_unittest(DynamicASTMatchersTes
RegistryTest.cpp)
target_link_libraries(DynamicASTMatchersTests
+ PRIVATE
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/unittests/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Analysis/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Analysis/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -8,6 +8,7 @@ add_clang_unittest(ClangAnalysisTests
)
target_link_libraries(ClangAnalysisTests
+ PRIVATE
clangAnalysis
clangAST
clangASTMatchers
Modified: cfe/trunk/unittests/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Basic/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -12,6 +12,7 @@ add_clang_unittest(BasicTests
)
target_link_libraries(BasicTests
+ PRIVATE
clangBasic
clangLex
)
Modified: cfe/trunk/unittests/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CodeGen/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CodeGen/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -10,6 +10,7 @@ add_clang_unittest(ClangCodeGenTests
)
target_link_libraries(ClangCodeGenTests
+ PRIVATE
clangAST
clangBasic
clangCodeGen
Modified: cfe/trunk/unittests/CrossTU/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CrossTU/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/CrossTU/CMakeLists.txt (original)
+++ cfe/trunk/unittests/CrossTU/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -8,6 +8,7 @@ add_clang_unittest(CrossTUTests
)
target_link_libraries(CrossTUTests
+ PRIVATE
clangAST
clangBasic
clangCrossTU
Modified: cfe/trunk/unittests/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Driver/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Driver/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Driver/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -11,6 +11,7 @@ add_clang_unittest(ClangDriverTests
)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Format/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -20,6 +20,7 @@ add_clang_unittest(FormatTests
)
target_link_libraries(FormatTests
+ PRIVATE
clangBasic
clangFormat
clangFrontend
Modified: cfe/trunk/unittests/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Frontend/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -11,6 +11,7 @@ add_clang_unittest(FrontendTests
PCHPreambleTest.cpp
)
target_link_libraries(FrontendTests
+ PRIVATE
clangAST
clangBasic
clangFrontend
Modified: cfe/trunk/unittests/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Lex/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -10,6 +10,7 @@ add_clang_unittest(LexTests
)
target_link_libraries(LexTests
+ PRIVATE
clangAST
clangBasic
clangLex
Modified: cfe/trunk/unittests/Rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Rename/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Rename/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Rename/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -14,6 +14,7 @@ add_clang_unittest(ClangRenameTests
)
target_link_libraries(ClangRenameTests
+ PRIVATE
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/unittests/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Rewrite/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Rewrite/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Rewrite/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -6,5 +6,6 @@ add_clang_unittest(RewriteTests
RewriteBufferTest.cpp
)
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=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Sema/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -7,6 +7,7 @@ add_clang_unittest(SemaTests
)
target_link_libraries(SemaTests
+ PRIVATE
clangAST
clangBasic
clangFrontend
Modified: cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt (original)
+++ cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -7,6 +7,7 @@ add_clang_unittest(StaticAnalysisTests
)
target_link_libraries(StaticAnalysisTests
+ PRIVATE
clangBasic
clangAnalysis
clangStaticAnalyzerCore
Modified: cfe/trunk/unittests/Tooling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Tooling/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -35,6 +35,7 @@ add_clang_unittest(ToolingTests
)
target_link_libraries(ToolingTests
+ PRIVATE
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/unittests/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/libclang/CMakeLists.txt?rev=319840&r1=319839&r2=319840&view=diff
==============================================================================
--- cfe/trunk/unittests/libclang/CMakeLists.txt (original)
+++ cfe/trunk/unittests/libclang/CMakeLists.txt Tue Dec 5 13:49:56 2017
@@ -3,5 +3,6 @@ add_clang_unittest(libclangTests
)
target_link_libraries(libclangTests
+ PRIVATE
libclang
)
More information about the cfe-commits
mailing list