summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/examples/BrainF/CMakeLists.txt6
-rw-r--r--llvm/examples/CMakeLists.txt12
-rw-r--r--llvm/examples/HowToUseJIT/CMakeLists.txt5
-rw-r--r--llvm/examples/ModuleMaker/CMakeLists.txt5
-rw-r--r--llvm/examples/ParallelJIT/CMakeLists.txt7
-rw-r--r--llvm/lib/Target/CBackend/CMakeLists.txt2
6 files changed, 35 insertions, 2 deletions
diff --git a/llvm/examples/BrainF/CMakeLists.txt b/llvm/examples/BrainF/CMakeLists.txt
new file mode 100644
index 00000000000..7bec105cdc8
--- /dev/null
+++ b/llvm/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/llvm/examples/CMakeLists.txt b/llvm/examples/CMakeLists.txt
index 392e59d9895..fa91149755c 100644
--- a/llvm/examples/CMakeLists.txt
+++ b/llvm/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/llvm/examples/HowToUseJIT/CMakeLists.txt b/llvm/examples/HowToUseJIT/CMakeLists.txt
new file mode 100644
index 00000000000..ad7da957697
--- /dev/null
+++ b/llvm/examples/HowToUseJIT/CMakeLists.txt
@@ -0,0 +1,5 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
+
+add_llvm_executable(HowToUseJIT
+ HowToUseJIT.cpp
+ )
diff --git a/llvm/examples/ModuleMaker/CMakeLists.txt b/llvm/examples/ModuleMaker/CMakeLists.txt
new file mode 100644
index 00000000000..81e911560bd
--- /dev/null
+++ b/llvm/examples/ModuleMaker/CMakeLists.txt
@@ -0,0 +1,5 @@
+set(LLVM_LINK_COMPONENTS bitwriter)
+
+add_llvm_example(ModuleMaker
+ ModuleMaker.cpp
+ )
diff --git a/llvm/examples/ParallelJIT/CMakeLists.txt b/llvm/examples/ParallelJIT/CMakeLists.txt
new file mode 100644
index 00000000000..d8dd7084c40
--- /dev/null
+++ b/llvm/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/llvm/lib/Target/CBackend/CMakeLists.txt b/llvm/lib/Target/CBackend/CMakeLists.txt
index b04912f7c9a..be243366d50 100644
--- a/llvm/lib/Target/CBackend/CMakeLists.txt
+++ b/llvm/lib/Target/CBackend/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_target(CBackEnd
+add_llvm_target(CBackend
CBackend.cpp
)
OpenPOWER on IntegriCloud