r202238 - [CMake] Use LINK_LIBS instead of target_link_libraries().
NAKAMURA Takumi
geek4civic at gmail.com
Tue Feb 25 22:41:30 PST 2014
Author: chapuni
Date: Wed Feb 26 00:41:29 2014
New Revision: 202238
URL: http://llvm.org/viewvc/llvm-project?rev=202238&view=rev
Log:
[CMake] Use LINK_LIBS instead of target_link_libraries().
Modified:
cfe/trunk/lib/ARCMigrate/CMakeLists.txt
cfe/trunk/lib/AST/CMakeLists.txt
cfe/trunk/lib/ASTMatchers/CMakeLists.txt
cfe/trunk/lib/ASTMatchers/Dynamic/CMakeLists.txt
cfe/trunk/lib/Analysis/CMakeLists.txt
cfe/trunk/lib/CodeGen/CMakeLists.txt
cfe/trunk/lib/Driver/CMakeLists.txt
cfe/trunk/lib/Edit/CMakeLists.txt
cfe/trunk/lib/Format/CMakeLists.txt
cfe/trunk/lib/Frontend/CMakeLists.txt
cfe/trunk/lib/FrontendTool/CMakeLists.txt
cfe/trunk/lib/Index/CMakeLists.txt
cfe/trunk/lib/Lex/CMakeLists.txt
cfe/trunk/lib/Parse/CMakeLists.txt
cfe/trunk/lib/Rewrite/Core/CMakeLists.txt
cfe/trunk/lib/Rewrite/Frontend/CMakeLists.txt
cfe/trunk/lib/Sema/CMakeLists.txt
cfe/trunk/lib/Serialization/CMakeLists.txt
cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt
cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt
cfe/trunk/lib/Tooling/CMakeLists.txt
Modified: cfe/trunk/lib/ARCMigrate/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/CMakeLists.txt (original)
+++ cfe/trunk/lib/ARCMigrate/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -23,9 +23,8 @@ add_clang_library(clangARCMigrate
TransZeroOutPropsInDealloc.cpp
TransformActions.cpp
Transforms.cpp
- )
-target_link_libraries(clangARCMigrate
+ LINK_LIBS
clangAST
clangAnalysis
clangBasic
Modified: cfe/trunk/lib/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CMakeLists.txt (original)
+++ cfe/trunk/lib/AST/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -57,9 +57,8 @@ add_clang_library(clangAST
TypePrinter.cpp
VTableBuilder.cpp
VTTBuilder.cpp
- )
-target_link_libraries(clangAST
+ LINK_LIBS
clangBasic
clangLex
)
Modified: cfe/trunk/lib/ASTMatchers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/CMakeLists.txt (original)
+++ cfe/trunk/lib/ASTMatchers/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -5,8 +5,7 @@ set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangASTMatchers
ASTMatchFinder.cpp
ASTMatchersInternal.cpp
- )
-target_link_libraries(clangASTMatchers
+ LINK_LIBS
clangAST
)
Modified: cfe/trunk/lib/ASTMatchers/Dynamic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/CMakeLists.txt (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -5,9 +5,8 @@ add_clang_library(clangDynamicASTMatcher
VariantValue.cpp
Parser.cpp
Registry.cpp
- )
-target_link_libraries(clangDynamicASTMatchers
+ LINK_LIBS
clangAST
clangASTMatchers
clangBasic
Modified: cfe/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -24,9 +24,8 @@ add_clang_library(clangAnalysis
ScanfFormatString.cpp
ThreadSafety.cpp
UninitializedValues.cpp
- )
-target_link_libraries(clangAnalysis
+ LINK_LIBS
clangBasic
clangAST
)
Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/lib/CodeGen/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -61,9 +61,8 @@ add_clang_library(clangCodeGen
DEPENDS
intrinsics_gen
- )
-target_link_libraries(clangCodeGen
+ LINK_LIBS
clangBasic
clangAST
clangFrontend
Modified: cfe/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CMakeLists.txt (original)
+++ cfe/trunk/lib/Driver/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -24,8 +24,7 @@ add_clang_library(clangDriver
DEPENDS
ClangCC1AsOptions
ClangDriverOptions
- )
-target_link_libraries(clangDriver
+ LINK_LIBS
clangBasic
)
Modified: cfe/trunk/lib/Edit/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Edit/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Edit/CMakeLists.txt (original)
+++ cfe/trunk/lib/Edit/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -6,9 +6,8 @@ add_clang_library(clangEdit
Commit.cpp
EditedSource.cpp
RewriteObjCFoundationAPI.cpp
- )
-target_link_libraries(clangEdit
+ LINK_LIBS
clangBasic
clangAST
clangLex
Modified: cfe/trunk/lib/Format/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Format/CMakeLists.txt (original)
+++ cfe/trunk/lib/Format/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -8,9 +8,8 @@ add_clang_library(clangFormat
TokenAnnotator.cpp
UnwrappedLineParser.cpp
WhitespaceManager.cpp
- )
-target_link_libraries(clangFormat
+ LINK_LIBS
clangBasic
clangLex
clangTooling
Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Frontend/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -36,9 +36,8 @@ add_clang_library(clangFrontend
DEPENDS
ClangDriverOptions
- )
-target_link_libraries(clangFrontend
+ LINK_LIBS
clangAST
clangBasic
clangDriver
Modified: cfe/trunk/lib/FrontendTool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/CMakeLists.txt (original)
+++ cfe/trunk/lib/FrontendTool/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -3,14 +3,7 @@ set(LLVM_LINK_COMPONENTS
Support
)
-add_clang_library(clangFrontendTool
- ExecuteCompilerInvocation.cpp
-
- DEPENDS
- ClangDriverOptions
- )
-
-target_link_libraries(clangFrontendTool
+set(link_libs
clangBasic
clangCodeGen
clangDriver
@@ -19,13 +12,23 @@ target_link_libraries(clangFrontendTool
)
if(CLANG_ENABLE_ARCMT)
- target_link_libraries(clangFrontendTool
+ list(APPEND link_libs
clangARCMigrate
)
endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
- target_link_libraries(clangFrontendTool
+ list(APPEND link_libs
clangStaticAnalyzerFrontend
)
endif()
+
+add_clang_library(clangFrontendTool
+ ExecuteCompilerInvocation.cpp
+
+ DEPENDS
+ ClangDriverOptions
+
+ LINK_LIBS
+ ${link_libs}
+ )
Modified: cfe/trunk/lib/Index/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Index/CMakeLists.txt (original)
+++ cfe/trunk/lib/Index/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -8,9 +8,8 @@ add_clang_library(clangIndex
ADDITIONAL_HEADERS
SimpleFormatContext.h
- )
-target_link_libraries(clangIndex
+ LINK_LIBS
clangAST
clangBasic
clangFormat
Modified: cfe/trunk/lib/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/CMakeLists.txt (original)
+++ cfe/trunk/lib/Lex/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -25,8 +25,7 @@ add_clang_library(clangLex
ScratchBuffer.cpp
TokenConcatenation.cpp
TokenLexer.cpp
- )
-target_link_libraries(clangLex
+ LINK_LIBS
clangBasic
)
Modified: cfe/trunk/lib/Parse/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/CMakeLists.txt (original)
+++ cfe/trunk/lib/Parse/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -19,9 +19,8 @@ add_clang_library(clangParse
ParseTemplate.cpp
ParseTentative.cpp
Parser.cpp
- )
-target_link_libraries(clangParse
+ LINK_LIBS
clangBasic
clangAST
clangLex
Modified: cfe/trunk/lib/Rewrite/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Core/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Core/CMakeLists.txt (original)
+++ cfe/trunk/lib/Rewrite/Core/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -8,9 +8,8 @@ add_clang_library(clangRewriteCore
RewriteRope.cpp
Rewriter.cpp
TokenRewriter.cpp
- )
-target_link_libraries(clangRewriteCore
+ LINK_LIBS
clangAST
clangBasic
clangLex
Modified: cfe/trunk/lib/Rewrite/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Rewrite/Frontend/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -11,9 +11,8 @@ add_clang_library(clangRewriteFrontend
RewriteModernObjC.cpp
RewriteObjC.cpp
RewriteTest.cpp
- )
-target_link_libraries(clangRewriteFrontend
+ LINK_LIBS
clangAST
clangBasic
clangEdit
Modified: cfe/trunk/lib/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/CMakeLists.txt (original)
+++ cfe/trunk/lib/Sema/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -48,9 +48,8 @@ add_clang_library(clangSema
SemaTemplateVariadic.cpp
SemaType.cpp
TypeLocBuilder.cpp
- )
-target_link_libraries(clangSema
+ LINK_LIBS
clangAST
clangAnalysis
clangBasic
Modified: cfe/trunk/lib/Serialization/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/CMakeLists.txt (original)
+++ cfe/trunk/lib/Serialization/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -20,9 +20,8 @@ add_clang_library(clangSerialization
ADDITIONAL_HEADERS
ASTCommon.h
ASTReaderInternals.h
- )
-target_link_libraries(clangSerialization
+ LINK_LIBS
clangAST
clangBasic
clangLex
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -77,9 +77,8 @@ add_clang_library(clangStaticAnalyzerChe
DEPENDS
ClangSACheckers
- )
-target_link_libraries(clangStaticAnalyzerCheckers
+ LINK_LIBS
clangAST
clangAnalysis
clangBasic
Modified: cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -39,9 +39,8 @@ add_clang_library(clangStaticAnalyzerCor
Store.cpp
SubEngine.cpp
SymbolManager.cpp
- )
-target_link_libraries(clangStaticAnalyzerCore
+ LINK_LIBS
clangAST
clangAnalysis
clangBasic
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -8,9 +8,8 @@ add_clang_library(clangStaticAnalyzerFro
AnalysisConsumer.cpp
CheckerRegistration.cpp
FrontendActions.cpp
- )
-target_link_libraries(clangStaticAnalyzerFrontend
+ LINK_LIBS
clangAST
clangAnalysis
clangBasic
Modified: cfe/trunk/lib/Tooling/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CMakeLists.txt?rev=202238&r1=202237&r2=202238&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CMakeLists.txt (original)
+++ cfe/trunk/lib/Tooling/CMakeLists.txt Wed Feb 26 00:41:29 2014
@@ -9,9 +9,8 @@ add_clang_library(clangTooling
Refactoring.cpp
RefactoringCallbacks.cpp
Tooling.cpp
- )
-target_link_libraries(clangTooling
+ LINK_LIBS
clangAST
clangASTMatchers
clangBasic
More information about the cfe-commits
mailing list