CMake: Builds all examples. Corrected name of CBackend target.
authorOscar Fuentes <ofv@wanadoo.es>
Fri, 26 Sep 2008 19:48:03 +0000 (19:48 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Fri, 26 Sep 2008 19:48:03 +0000 (19:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8

examples/BrainF/CMakeLists.txt [new file with mode: 0644]
examples/CMakeLists.txt
examples/HowToUseJIT/CMakeLists.txt [new file with mode: 0644]
examples/ModuleMaker/CMakeLists.txt [new file with mode: 0644]
examples/ParallelJIT/CMakeLists.txt [new file with mode: 0644]
lib/Target/CBackend/CMakeLists.txt

diff --git a/examples/BrainF/CMakeLists.txt b/examples/BrainF/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7bec105
--- /dev/null
@@ -0,0 +1,6 @@
+set(LLVM_LINK_COMPONENTS jit bitwriter nativecodegen interpreter)
+
+add_llvm_example(BrainF
+  BrainF.cpp
+  BrainFDriver.cpp
+  )
index 392e59d9895271e7e1c0adcab264c2a7b29c7ea5..fa91149755c68243c222e4ba36bc74a4f7ecf42a 100644 (file)
@@ -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 (file)
index 0000000..ad7da95
--- /dev/null
@@ -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 (file)
index 0000000..81e9115
--- /dev/null
@@ -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 (file)
index 0000000..d8dd708
--- /dev/null
@@ -0,0 +1,7 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
+
+add_llvm_example(ParallelJIT
+  ParallelJIT.cpp
+  )
+
+target_link_libraries(ParallelJIT pthread)
index b04912f7c9ac6b5cb9348a7b30e9802519e10cc0..be243366d50ebfd96b01614d2acdfc94150ebdf4 100644 (file)
@@ -1,3 +1,3 @@
-add_llvm_target(CBackEnd
+add_llvm_target(CBackend
   CBackend.cpp
   )