summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2008-09-26 19:48:03 +0000
committerOscar Fuentes <ofv@wanadoo.es>2008-09-26 19:48:03 +0000
commitdbc2e856fce973243d2dfba88d573d3c88f06020 (patch)
tree979cbee4a308e05095045e55f4fc1c399eb2b153 /examples
parentdfe8c84e1e7be1ec4f7303d3d056fb106ab28437 (diff)
downloadllvm-dbc2e856fce973243d2dfba88d573d3c88f06020.tar.gz
llvm-dbc2e856fce973243d2dfba88d573d3c88f06020.tar.bz2
llvm-dbc2e856fce973243d2dfba88d573d3c88f06020.tar.xz
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
Diffstat (limited to 'examples')
-rw-r--r--examples/BrainF/CMakeLists.txt6
-rw-r--r--examples/CMakeLists.txt12
-rw-r--r--examples/HowToUseJIT/CMakeLists.txt5
-rw-r--r--examples/ModuleMaker/CMakeLists.txt5
-rw-r--r--examples/ParallelJIT/CMakeLists.txt7
5 files changed, 34 insertions, 1 deletions
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)