[cfe-commits] r113631 - in /cfe/trunk: ./ examples/PrintFunctionNames/ examples/clang-interpreter/ examples/wpa/ lib/AST/ lib/Analysis/ lib/Basic/ lib/Checker/ lib/CodeGen/ lib/Driver/ lib/Frontend/ lib/FrontendTool/ lib/Index/ lib/Lex/ lib/Parse/ lib/Rewrite/ lib/Sema/ lib/Serialization/ tools/c-index-test/ tools/driver/ tools/libclang/
Michael J. Spencer
bigcheesegs at gmail.com
Fri Sep 10 14:13:16 PDT 2010
Author: mspencer
Date: Fri Sep 10 16:13:16 2010
New Revision: 113631
URL: http://llvm.org/viewvc/llvm-project?rev=113631&view=rev
Log:
CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
cfe/trunk/examples/clang-interpreter/CMakeLists.txt
cfe/trunk/examples/wpa/CMakeLists.txt
cfe/trunk/lib/AST/CMakeLists.txt
cfe/trunk/lib/Analysis/CMakeLists.txt
cfe/trunk/lib/Basic/CMakeLists.txt
cfe/trunk/lib/Checker/CMakeLists.txt
cfe/trunk/lib/CodeGen/CMakeLists.txt
cfe/trunk/lib/Driver/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/CMakeLists.txt
cfe/trunk/lib/Sema/CMakeLists.txt
cfe/trunk/lib/Serialization/CMakeLists.txt
cfe/trunk/tools/c-index-test/CMakeLists.txt
cfe/trunk/tools/driver/CMakeLists.txt
cfe/trunk/tools/libclang/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -24,7 +24,7 @@
endif()
# Compute the Clang version from the LLVM version.
-string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
+string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
${PACKAGE_VERSION})
message(STATUS "Clang version: ${CLANG_VERSION}")
@@ -63,7 +63,7 @@
set(srcs ${srcs} ${headers})
string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
list( GET split_path -1 dir)
- file( GLOB_RECURSE headers
+ file( GLOB_RECURSE headers
../../include/clang${dir}/*.h
../../include/clang${dir}/*.td
../../include/clang${dir}/*.def)
@@ -92,6 +92,9 @@
if( llvm_system_libs )
target_link_libraries(${name} ${llvm_system_libs})
endif( llvm_system_libs )
+ if (LLVM_COMMON_LIBS)
+ target_link_libraries(${name} ${LLVM_COMMON_LIBS})
+ endif()
add_dependencies(${name} ClangDiagnosticCommon)
if(MSVC)
get_target_property(cflag ${name} COMPILE_FLAGS)
@@ -102,6 +105,7 @@
set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag})
endif(MSVC)
install(TARGETS ${name}
+ EXPORT LLVM
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
endmacro(add_clang_library)
Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -2,7 +2,16 @@
set(LLVM_NO_RTTI 1)
-add_clang_library(PrintFunctionNames PrintFunctionNames.cpp)
+add_clang_library(PrintFunctionNames
+ PrintFunctionNames.cpp
+ )
+
+target_link_libraries(PrintFunctionNames
+ clangAST
+ clangFrontend
+ clangBasic
+ )
+
set_target_properties(PrintFunctionNames
PROPERTIES
Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/CMakeLists.txt (original)
+++ cfe/trunk/examples/clang-interpreter/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,34 +1,24 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS
- clangFrontend
- clangSerialization
- clangDriver
- clangCodeGen
- clangSema
- clangChecker
- clangIndex
- clangAnalysis
- clangRewrite
- clangAST
- clangParse
- clangLex
- clangBasic
- )
-
-set(LLVM_LINK_COMPONENTS
- jit
- interpreter
- nativecodegen
- asmparser
- bitreader
- bitwriter
- codegen
- ipo
- selectiondag
- )
-
add_clang_executable(clang-interpreter
main.cpp
)
+
+add_llvm_link_components(clang-interpreter jit interpreter nativecodegen)
+target_link_libraries(clang-interpreter
+ clangFrontend
+ clangSerialization
+ clangDriver
+ clangCodeGen
+ clangSema
+ clangChecker
+ clangIndex
+ clangAnalysis
+ clangRewrite
+ clangAST
+ clangParse
+ clangLex
+ clangBasic
+ )
+
add_dependencies(clang-interpreter clang-headers)
Modified: cfe/trunk/examples/wpa/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/wpa/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/CMakeLists.txt (original)
+++ cfe/trunk/examples/wpa/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,6 +1,10 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS
+add_clang_executable(clang-wpa
+ clang-wpa.cpp
+ )
+
+target_link_libraries(clang-wpa
clangIndex
clangFrontend
clangDriver
@@ -12,15 +16,9 @@
clangAST
clangParse
clangLex
- clangBasic)
-
-set( LLVM_LINK_COMPONENTS
- bitreader
- mc
- core
+ clangBasic
)
-add_clang_executable(clang-wpa
- clang-wpa.cpp
+add_dependencies(clang-wpa
+ clang-headers
)
-add_dependencies(clang-wpa clang-headers)
Modified: cfe/trunk/lib/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CMakeLists.txt (original)
+++ cfe/trunk/lib/AST/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic)
-
add_clang_library(clangAST
APValue.cpp
ASTConsumer.cpp
@@ -44,5 +42,16 @@
TypePrinter.cpp
)
-add_dependencies(clangAST ClangARMNeon ClangAttrClasses ClangAttrList
- ClangAttrImpl ClangDiagnosticAST ClangDeclNodes ClangStmtNodes)
+target_link_libraries(clangAST
+ clangBasic
+ )
+
+add_dependencies(clangAST
+ ClangARMNeon
+ ClangAttrClasses
+ ClangAttrList
+ ClangAttrImpl
+ ClangDiagnosticAST
+ ClangDeclNodes
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangIndex)
-
add_clang_library(clangAnalysis
AnalysisContext.cpp
CFG.cpp
@@ -15,5 +13,16 @@
UninitializedValues.cpp
)
-add_dependencies(clangAnalysis ClangAttrClasses ClangAttrList
- ClangDiagnosticAnalysis ClangDeclNodes ClangStmtNodes)
+target_link_libraries(clangAnalysis
+ clangBasic
+ clangAST
+ clangIndex
+ )
+
+add_dependencies(clangAnalysis
+ ClangAttrClasses
+ ClangAttrList
+ ClangDiagnosticAnalysis
+ ClangDeclNodes
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/CMakeLists.txt (original)
+++ cfe/trunk/lib/Basic/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -14,6 +14,10 @@
Version.cpp
)
+target_link_libraries(clangBasic
+ LLVMMC
+ )
+
# Determine Subversion revision.
# FIXME: This only gets updated when CMake is run, so this revision number
# may be out-of-date!
@@ -24,16 +28,17 @@
PROPERTIES COMPILE_DEFINITIONS "SVN_REVISION=\"${CLANG_WC_REVISION}\"")
endif()
-add_dependencies(clangBasic
- ClangARMNeon
- ClangAttrList
- ClangDiagnosticAnalysis
- ClangDiagnosticAST
- ClangDiagnosticCommon
- ClangDiagnosticDriver
- ClangDiagnosticFrontend
- ClangDiagnosticGroups
- ClangDiagnosticLex
- ClangDiagnosticParse
- ClangDiagnosticSema)
-
+add_dependencies(clangBasic
+ ClangARMNeon
+ ClangAttrList
+ ClangDiagnosticAnalysis
+ ClangDiagnosticAST
+ ClangDiagnosticCommon
+ ClangDiagnosticDriver
+ ClangDiagnosticFrontend
+ ClangDiagnosticGroups
+ ClangDiagnosticLex
+ ClangDiagnosticParse
+ ClangDiagnosticSema
+ )
+
Modified: cfe/trunk/lib/Checker/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CMakeLists.txt (original)
+++ cfe/trunk/lib/Checker/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
-
add_clang_library(clangChecker
AdjustedReturnValueChecker.cpp
AggExprVisitor.cpp
@@ -84,5 +82,17 @@
ValueManager.cpp
)
-add_dependencies(clangChecker ClangAttrClasses ClangAttrList ClangDeclNodes
- ClangStmtNodes)
+target_link_libraries(clangChecker
+ clangBasic
+ clangLex
+ clangAST
+ clangFrontend
+ clangRewrite
+ )
+
+add_dependencies(clangChecker
+ ClangAttrClasses
+ ClangAttrList
+ ClangDeclNodes
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/lib/CodeGen/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangFrontend)
-
add_clang_library(clangCodeGen
BackendUtil.cpp
CGBlocks.cpp
@@ -39,5 +37,17 @@
TargetInfo.cpp
)
-add_dependencies(clangCodeGen ClangAttrClasses ClangAttrList ClangDeclNodes
- ClangStmtNodes)
+target_link_libraries(clangCodeGen
+ LLVMCore
+ LLVMAsmParser
+ LLVMBitReader
+ LLVMBitWriter
+ LLVMipo
+ )
+
+add_dependencies(clangCodeGen
+ ClangAttrClasses
+ ClangAttrList
+ ClangDeclNodes
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CMakeLists.txt (original)
+++ cfe/trunk/lib/Driver/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangParse)
-
add_clang_library(clangDriver
Action.cpp
Arg.cpp
@@ -23,5 +21,16 @@
Types.cpp
)
-add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver
- ClangDriverOptions ClangCC1Options ClangCC1AsOptions)
+target_link_libraries(clangDriver
+ clangBasic
+ clangAST
+ clangParse
+ )
+
+add_dependencies(clangDriver
+ ClangAttrList
+ ClangDiagnosticDriver
+ ClangDriverOptions
+ ClangCC1Options
+ ClangCC1AsOptions
+ )
Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Frontend/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,14 +1,5 @@
set(LLVM_NO_RTTI 1)
-set( LLVM_USED_LIBS
- clangDriver
- clangParse
- clangSema
- clangAST
- clangLex
- clangBasic
- )
-
add_clang_library(clangFrontend
ASTConsumers.cpp
ASTMerge.cpp
@@ -36,6 +27,17 @@
Warnings.cpp
)
+target_link_libraries(clangFrontend
+ LLVMCore
+
+ clangDriver
+ clangParse
+ clangSema
+ clangAST
+ clangLex
+ clangBasic
+ )
+
IF(MSVC)
get_target_property(NON_ANSI_COMPILE_FLAGS clangFrontend COMPILE_FLAGS)
string(REPLACE /Za
@@ -44,12 +46,13 @@
set_target_properties(clangFrontend PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
ENDIF(MSVC)
-add_dependencies(clangFrontend
+add_dependencies(clangFrontend
ClangAttrClasses
ClangAttrList
ClangCC1Options
- ClangDiagnosticFrontend
+ ClangDiagnosticFrontend
ClangDiagnosticLex
ClangDiagnosticSema
ClangDeclNodes
- ClangStmtNodes)
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/FrontendTool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/CMakeLists.txt (original)
+++ cfe/trunk/lib/FrontendTool/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,8 +1,13 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangDriver clangFrontend clangRewrite clangCodeGen
- clangChecker)
-
add_clang_library(clangFrontendTool
ExecuteCompilerInvocation.cpp
)
+
+target_link_libraries(clangFrontendTool
+ clangDriver
+ clangFrontend
+ clangRewrite
+ clangCodeGen
+ clangChecker
+ )
Modified: cfe/trunk/lib/Index/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Index/CMakeLists.txt (original)
+++ cfe/trunk/lib/Index/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,8 +1,20 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangLex clangAST)
+add_clang_library(clangIndex
+ ASTLocation.cpp
+ Analyzer.cpp
+ CallGraph.cpp
+ DeclReferenceMap.cpp
+ Entity.cpp
+ GlobalSelector.cpp
+ Handlers.cpp
+ IndexProvider.cpp
+ Indexer.cpp
+ Program.cpp
+ SelectorMap.cpp
+ )
-set( LLVM_USED_LIBS
+target_link_libraries(clangIndex
clangSerialization
clangFrontend
clangParse
@@ -16,19 +28,9 @@
clangBasic
)
-add_clang_library(clangIndex
- ASTLocation.cpp
- Analyzer.cpp
- CallGraph.cpp
- DeclReferenceMap.cpp
- Entity.cpp
- GlobalSelector.cpp
- Handlers.cpp
- IndexProvider.cpp
- Indexer.cpp
- Program.cpp
- SelectorMap.cpp
+add_dependencies(clangIndex
+ ClangAttrClasses
+ ClangAttrList
+ ClangDeclNodes
+ ClangStmtNodes
)
-
-add_dependencies(clangIndex ClangAttrClasses ClangAttrList
- ClangDeclNodes ClangStmtNodes)
Modified: cfe/trunk/lib/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/CMakeLists.txt (original)
+++ cfe/trunk/lib/Lex/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -2,8 +2,6 @@
# TODO: Add -maltivec when ARCH is PowerPC.
-set(LLVM_USED_LIBS clangBasic)
-
add_clang_library(clangLex
HeaderMap.cpp
HeaderSearch.cpp
@@ -26,4 +24,10 @@
TokenLexer.cpp
)
-add_dependencies(clangLex ClangDiagnosticLex)
+target_link_libraries(clangLex
+ clangBasic
+ )
+
+add_dependencies(clangLex
+ ClangDiagnosticLex
+ )
Modified: cfe/trunk/lib/Parse/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/CMakeLists.txt (original)
+++ cfe/trunk/lib/Parse/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangLex clangSema)
-
add_clang_library(clangParse
ParseAST.cpp
ParseCXXInlineMethods.cpp
@@ -18,4 +16,17 @@
Parser.cpp
)
-add_dependencies(clangParse ClangAttrClasses ClangAttrList ClangDeclNodes ClangDiagnosticParse ClangStmtNodes)
+target_link_libraries(clangParse
+ clangBasic
+ clangAST
+ clangLex
+ clangSema
+ )
+
+add_dependencies(clangParse
+ ClangAttrClasses
+ ClangAttrList
+ ClangDeclNodes
+ ClangDiagnosticParse
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/CMakeLists.txt (original)
+++ cfe/trunk/lib/Rewrite/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangParse clangFrontend)
-
add_clang_library(clangRewrite
DeltaTree.cpp
FixItRewriter.cpp
@@ -16,8 +14,16 @@
TokenRewriter.cpp
)
+target_link_libraries(clangRewrite
+ clangBasic
+ clangAST
+ clangParse
+ clangFrontend
+ )
+
add_dependencies(clangRewrite
ClangAttrClasses
ClangAttrList
ClangDeclNodes
- ClangStmtNodes)
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/CMakeLists.txt (original)
+++ cfe/trunk/lib/Sema/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangAST clangLex clangAnalysis)
-
add_clang_library(clangSema
AnalysisBasedWarnings.cpp
AttributeList.cpp
@@ -37,5 +35,15 @@
TargetAttributesSema.cpp
)
-add_dependencies(clangSema ClangARMNeon ClangAttrClasses ClangAttrList
- ClangDiagnosticSema ClangDeclNodes ClangStmtNodes)
+target_link_libraries(clangSema
+ clangAnalysis
+ )
+
+add_dependencies(clangSema
+ ClangARMNeon
+ ClangAttrClasses
+ ClangAttrList
+ ClangDiagnosticSema
+ ClangDeclNodes
+ ClangStmtNodes
+ )
Modified: cfe/trunk/lib/Serialization/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/CMakeLists.txt (original)
+++ cfe/trunk/lib/Serialization/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,7 +1,5 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangFrontend)
-
add_clang_library(clangSerialization
GeneratePCH.cpp
ASTCommon.cpp
@@ -13,6 +11,10 @@
ASTWriterStmt.cpp
)
+target_link_libraries(clangSerialization
+ clangFrontend
+ )
+
add_dependencies(clangSerialization
ClangAttrClasses
ClangAttrList
@@ -22,4 +24,5 @@
ClangDiagnosticLex
ClangDiagnosticSema
ClangDeclNodes
- ClangStmtNodes)
+ ClangStmtNodes
+ )
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=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/c-index-test/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,17 +1,13 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS libclang)
-
-set( LLVM_LINK_COMPONENTS
- bitreader
- mc
- core
- )
-
add_clang_executable(c-index-test
c-index-test.c
)
+target_link_libraries(c-index-test
+ libclang
+ )
+
set_target_properties(c-index-test
PROPERTIES
LINKER_LANGUAGE CXX)
Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -1,6 +1,20 @@
set(LLVM_NO_RTTI 1)
-set( LLVM_USED_LIBS
+add_clang_executable(clang
+ driver.cpp
+ cc1_main.cpp
+ cc1as_main.cpp
+ )
+
+add_llvm_link_components(clang all)
+target_link_libraries(clang
+ LLVMAsmParser
+ LLVMBitReader
+ LLVMBitWriter
+ LLVMCodeGen
+ LLVMipo
+ LLVMSelectionDAG
+
clangFrontendTool
clangFrontend
clangDriver
@@ -17,22 +31,6 @@
clangBasic
)
-set( LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
- asmparser
- bitreader
- bitwriter
- codegen
- ipo
- selectiondag
- )
-
-add_clang_executable(clang
- driver.cpp
- cc1_main.cpp
- cc1as_main.cpp
- )
-
if(UNIX)
set(CLANGXX_LINK_OR_COPY create_symlink)
set(CLANGXX_DESTDIR $ENV{DESTDIR}/)
Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=113631&r1=113630&r2=113631&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Fri Sep 10 16:13:16 2010
@@ -2,22 +2,6 @@
set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS
- clangFrontend
- clangDriver
- clangSerialization
- clangIndex
- clangSema
- clangAST
- clangLex
- clangBasic)
-
-set( LLVM_LINK_COMPONENTS
- bitreader
- mc
- core
- )
-
add_clang_library(libclang
CIndex.cpp
CIndexCXX.cpp
@@ -29,19 +13,34 @@
CXCursor.cpp
CXType.cpp
../../include/clang-c/Index.h
-)
+ )
+
+target_link_libraries(libclang
+ LLVMBitReader
+ LLVMMC
+ LLVMCore
+
+ clangFrontend
+ clangDriver
+ clangSerialization
+ clangIndex
+ clangSema
+ clangAST
+ clangLex
+ clangBasic
+ )
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# dylib versioning information
# FIXME: Is there a more CMake-ish way to handle this?
- set(LIBCLANG_VERSION 1
+ set(LIBCLANG_VERSION 1
CACHE STRING "Version number of the libclang library")
set(LIBCLANG_SUBVERSION 0
CACHE STRING "Minor version number of the libclang library")
- set(LIBCLANG_LINK_FLAGS
+ set(LIBCLANG_LINK_FLAGS
"-Wl,-current_version -Wl,${LIBCLANG_VERSION}.${LIBCLANG_SUBVERSION} -Wl,-compatibility_version -Wl,1")
- set(LIBCLANG_LINK_FLAGS
+ set(LIBCLANG_LINK_FLAGS
"${LIBCLANG_LINK_FLAGS} -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000")
set_target_properties(libclang
More information about the cfe-commits
mailing list