diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-09-10 21:13:16 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-09-10 21:13:16 +0000 |
commit | 5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 (patch) | |
tree | 941eb8d3338ad2ca2c87281f023ed882a385dec2 /examples | |
parent | ce5eff5c813daead3f51dcfb8261a7b5643ede5c (diff) |
CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/PrintFunctionNames/CMakeLists.txt | 11 | ||||
-rw-r--r-- | examples/clang-interpreter/CMakeLists.txt | 46 | ||||
-rw-r--r-- | examples/wpa/CMakeLists.txt | 18 |
3 files changed, 36 insertions, 39 deletions
diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt index 5ea75db42e..cea15bf934 100644 --- a/examples/PrintFunctionNames/CMakeLists.txt +++ b/examples/PrintFunctionNames/CMakeLists.txt @@ -2,7 +2,16 @@ set(MODULE TRUE) 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 diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt index 73f28bb7a2..c00874322e 100644 --- a/examples/clang-interpreter/CMakeLists.txt +++ b/examples/clang-interpreter/CMakeLists.txt @@ -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) diff --git a/examples/wpa/CMakeLists.txt b/examples/wpa/CMakeLists.txt index 13e4298c1f..b7d85cbbfd 100644 --- a/examples/wpa/CMakeLists.txt +++ b/examples/wpa/CMakeLists.txt @@ -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 @@ set(LLVM_USED_LIBS 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) |