diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-06-21 01:30:21 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-06-21 01:30:21 +0000 |
commit | b0d8671f95fe08a220118bca29063ba4d11a9dac (patch) | |
tree | cab72330a29dcc55d7c6f27692624f3e70469bd5 /examples | |
parent | 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e (diff) |
Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.
This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/PrintFunctionNames/CMakeLists.txt | 10 | ||||
-rw-r--r-- | examples/analyzer-plugin/CMakeLists.txt | 8 | ||||
-rw-r--r-- | examples/clang-interpreter/CMakeLists.txt | 59 |
3 files changed, 40 insertions, 37 deletions
diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt index 86793ce7e1..a31a8f69e7 100644 --- a/examples/PrintFunctionNames/CMakeLists.txt +++ b/examples/PrintFunctionNames/CMakeLists.txt @@ -1,14 +1,14 @@ set(MODULE TRUE) -set( LLVM_USED_LIBS - clangFrontend - clangAST - ) - set( LLVM_LINK_COMPONENTS support mc) add_clang_library(PrintFunctionNames PrintFunctionNames.cpp) +target_link_libraries(PrintFunctionNames + clangFrontend + clangAST + ) + set_target_properties(PrintFunctionNames PROPERTIES LINKER_LANGUAGE CXX diff --git a/examples/analyzer-plugin/CMakeLists.txt b/examples/analyzer-plugin/CMakeLists.txt index 2b9d82587f..9ad5cace80 100644 --- a/examples/analyzer-plugin/CMakeLists.txt +++ b/examples/analyzer-plugin/CMakeLists.txt @@ -1,13 +1,13 @@ set(MODULE TRUE) -set( LLVM_USED_LIBS - clangStaticAnalyzerCore - ) - set( LLVM_LINK_COMPONENTS support mc) add_clang_library(SampleAnalyzerPlugin MainCallChecker.cpp) +target_link_libraries(SampleAnalyzerPlugin + clangStaticAnalyzerCore + ) + set_target_properties(SampleAnalyzerPlugin PROPERTIES LINKER_LANGUAGE CXX diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt index 809e324dbe..9abefc274b 100644 --- a/examples/clang-interpreter/CMakeLists.txt +++ b/examples/clang-interpreter/CMakeLists.txt @@ -1,34 +1,37 @@ -set(LLVM_USED_LIBS - clangFrontend - clangSerialization - clangDriver - clangCodeGen - clangSema - clangStaticAnalyzerFrontend - clangStaticAnalyzerCheckers - clangStaticAnalyzerCore - clangAnalysis - clangRewrite - clangAST - clangParse - clangLex - clangBasic - ) - set(LLVM_LINK_COMPONENTS - jit - interpreter - nativecodegen - asmparser - bitreader - bitwriter - codegen - ipo - linker - selectiondag + jit + interpreter + nativecodegen + asmparser + bitreader + bitwriter + codegen + ipo + linker + selectiondag ) add_clang_executable(clang-interpreter main.cpp ) -add_dependencies(clang-interpreter clang-headers) + +add_dependencies(clang-interpreter + clang-headers + ) + +target_link_libraries(clang-interpreter + clangFrontend + clangSerialization + clangDriver + clangCodeGen + clangSema + clangStaticAnalyzerFrontend + clangStaticAnalyzerCheckers + clangStaticAnalyzerCore + clangAnalysis + clangRewrite + clangAST + clangParse + clangLex + clangBasic + ) |