From dbc2e856fce973243d2dfba88d573d3c88f06020 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Fri, 26 Sep 2008 19:48:03 +0000 Subject: CMake: Builds all examples. Corrected name of CBackend target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/BrainF/CMakeLists.txt | 6 ++++++ examples/CMakeLists.txt | 12 +++++++++++- examples/HowToUseJIT/CMakeLists.txt | 5 +++++ examples/ModuleMaker/CMakeLists.txt | 5 +++++ examples/ParallelJIT/CMakeLists.txt | 7 +++++++ lib/Target/CBackend/CMakeLists.txt | 2 +- 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 examples/BrainF/CMakeLists.txt create mode 100644 examples/HowToUseJIT/CMakeLists.txt create mode 100644 examples/ModuleMaker/CMakeLists.txt create mode 100644 examples/ParallelJIT/CMakeLists.txt diff --git a/examples/BrainF/CMakeLists.txt b/examples/BrainF/CMakeLists.txt new file mode 100644 index 0000000000..7bec105cdc --- /dev/null +++ b/examples/BrainF/CMakeLists.txt @@ -0,0 +1,6 @@ +set(LLVM_LINK_COMPONENTS jit bitwriter nativecodegen interpreter) + +add_llvm_example(BrainF + BrainF.cpp + BrainFDriver.cpp + ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 392e59d989..fa91149755 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1 +1,11 @@ -add_subdirectory(Fibonacci) \ No newline at end of file +add_subdirectory(BrainF) +add_subdirectory(Fibonacci) +add_subdirectory(HowToUseJIT) +add_subdirectory(ModuleMaker) + +include(CheckIncludeFile) +check_include_file(pthread.h HAVE_PTHREAD_H) + +if( HAVE_PTHREAD_H ) + add_subdirectory(ParallelJIT) +endif( HAVE_PTHREAD_H ) diff --git a/examples/HowToUseJIT/CMakeLists.txt b/examples/HowToUseJIT/CMakeLists.txt new file mode 100644 index 0000000000..ad7da95769 --- /dev/null +++ b/examples/HowToUseJIT/CMakeLists.txt @@ -0,0 +1,5 @@ +set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen) + +add_llvm_executable(HowToUseJIT + HowToUseJIT.cpp + ) diff --git a/examples/ModuleMaker/CMakeLists.txt b/examples/ModuleMaker/CMakeLists.txt new file mode 100644 index 0000000000..81e911560b --- /dev/null +++ b/examples/ModuleMaker/CMakeLists.txt @@ -0,0 +1,5 @@ +set(LLVM_LINK_COMPONENTS bitwriter) + +add_llvm_example(ModuleMaker + ModuleMaker.cpp + ) diff --git a/examples/ParallelJIT/CMakeLists.txt b/examples/ParallelJIT/CMakeLists.txt new file mode 100644 index 0000000000..d8dd7084c4 --- /dev/null +++ b/examples/ParallelJIT/CMakeLists.txt @@ -0,0 +1,7 @@ +set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen) + +add_llvm_example(ParallelJIT + ParallelJIT.cpp + ) + +target_link_libraries(ParallelJIT pthread) diff --git a/lib/Target/CBackend/CMakeLists.txt b/lib/Target/CBackend/CMakeLists.txt index b04912f7c9..be243366d5 100644 --- a/lib/Target/CBackend/CMakeLists.txt +++ b/lib/Target/CBackend/CMakeLists.txt @@ -1,3 +1,3 @@ -add_llvm_target(CBackEnd +add_llvm_target(CBackend CBackend.cpp ) -- cgit v1.2.3